aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/syncthing.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-05-09 21:29:46 +0200
committerMarius Bakke <marius@gnu.org>2021-05-09 21:29:46 +0200
commitf03426420497cd9839f5fb3cb547dbecd8d6053b (patch)
tree220cdbab5b58b27c63d2df3ee711ad4bfdda074b /gnu/packages/syncthing.scm
parent3cf1afb7e7249992b2db2f4f00899fd22237e89a (diff)
parent069399ee9dbf75b7c89583f03346a63b2cfe4ac6 (diff)
downloadguix-f03426420497cd9839f5fb3cb547dbecd8d6053b.tar
guix-f03426420497cd9839f5fb3cb547dbecd8d6053b.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/local.mk gnu/packages/bioinformatics.scm gnu/packages/django.scm gnu/packages/gtk.scm gnu/packages/llvm.scm gnu/packages/python-web.scm gnu/packages/python.scm gnu/packages/tex.scm guix/build-system/asdf.scm guix/build/emacs-build-system.scm guix/profiles.scm
Diffstat (limited to 'gnu/packages/syncthing.scm')
-rw-r--r--gnu/packages/syncthing.scm34
1 files changed, 20 insertions, 14 deletions
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index e800aebda7..e40f696720 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2016 Petter <petter@mykolab.ch>
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
@@ -75,6 +75,14 @@
(("120s") "999s"))
#t))
+ (add-before 'build 'pre-build
+ (lambda _
+ (with-directory-excursion "src/github.com/syncthing/syncthing"
+ ;; Don't set a local GOBIN, it breaks cross compiling.
+ (substitute* "build.go"
+ ((".*GOBIN.*") "")))
+ #t))
+
(replace 'build
(lambda _
(with-directory-excursion "src/github.com/syncthing/syncthing"
@@ -83,27 +91,25 @@
;; "build syncthing" again with -no-upgrade.
;; https://github.com/syncthing/syncthing/issues/6118
(invoke "go" "run" "build.go")
- (delete-file "bin/syncthing")
+ (for-each delete-file (find-files "../../../../bin" "syncthing"))
(invoke "go" "run" "build.go" "-no-upgrade" "build" "syncthing"))))
(replace 'check
- (lambda _
- (with-directory-excursion "src/github.com/syncthing/syncthing"
- (invoke "go" "run" "build.go" "test"))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "src/github.com/syncthing/syncthing"
+ (invoke "go" "run" "build.go" "test")))
+ #t))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(utils (assoc-ref outputs "utils")))
- (with-directory-excursion "src/github.com/syncthing/syncthing/bin"
- (install-file "../syncthing" (string-append out "/bin"))
- (for-each (cut install-file <> (string-append utils "/bin/"))
- '("stcompdirs" "stcrashreceiver"
- "stdisco" "stdiscosrv" "stevents" "stfileinfo"
- "stfinddevice" "stfindignored" "stgenfiles"
- "stindex" "strelaypoolsrv" "strelaysrv" "stsigtool"
- "stvanity" "stwatchfile" "uraggregate" "ursrv"))
- #t))))
+ (with-directory-excursion "src/github.com/syncthing/syncthing"
+ (install-file "syncthing" (string-append out "/bin")))
+ (for-each (cut install-file <> (string-append utils "/bin/"))
+ (find-files "bin"))
+ #t)))
(add-after 'install 'install-docs
(lambda* (#:key outputs #:allow-other-keys)