Archived
1
0
Fork 0

gnu: Syncthing: Update to 1.3.4.

* gnu/packages/syncthing.scm (syncthing): Update to 1.3.4.
[arguments]: Adjust to changes in the upstream build tooling in the 'build'
and 'install' phases.
[inputs]: Add go-github-com-cespare-xxhash.
This commit is contained in:
Leo Famulari 2020-02-12 17:04:41 -05:00
parent 9c2eb9622d
commit 3dbab6824d
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08

View file

@ -30,7 +30,7 @@
(define-public syncthing (define-public syncthing
(package (package
(name "syncthing") (name "syncthing")
(version "1.2.2") (version "1.3.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://github.com/syncthing/syncthing" (uri (string-append "https://github.com/syncthing/syncthing"
@ -38,7 +38,7 @@
"/syncthing-source-v" version ".tar.gz")) "/syncthing-source-v" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1wdjh8xw09s1nfkpc95v04619gqa4dpbygp2y5l35ww4g916lv3s")) "025fhfqzcl5qd38zak8485pd67iqkzsf6frm02cl25s3ggv2f0p4"))
(modules '((guix build utils))) (modules '((guix build utils)))
;; Delete bundled ("vendored") free software source code. ;; Delete bundled ("vendored") free software source code.
(snippet '(begin (snippet '(begin
@ -100,7 +100,10 @@
("go-github-com-d4l3k-messagediff" ,go-github-com-d4l3k-messagediff))) ("go-github-com-d4l3k-messagediff" ,go-github-com-d4l3k-messagediff)))
(arguments (arguments
`(#:import-path "github.com/syncthing/syncthing" `(#:modules ((srfi srfi-26) ; for cut
(guix build utils)
(guix build go-build-system))
#:import-path "github.com/syncthing/syncthing"
;; We don't need to install the source code for end-user applications. ;; We don't need to install the source code for end-user applications.
#:install-source? #f #:install-source? #f
#:phases #:phases
@ -114,7 +117,13 @@
(replace 'build (replace 'build
(lambda _ (lambda _
(with-directory-excursion "src/github.com/syncthing/syncthing" (with-directory-excursion "src/github.com/syncthing/syncthing"
(invoke "go" "run" "build.go" "-no-upgrade")))) ;; XXX The only way to build Syncthing without its automatic
;; updater and to build the utilities is to "build all" and then
;; "build syncthing" again with -no-upgrade.
;; https://github.com/syncthing/syncthing/issues/6118
(invoke "go" "run" "build.go" "build" "all")
(delete-file "syncthing")
(invoke "go" "run" "build.go" "-no-upgrade" "build" "syncthing"))))
(replace 'check (replace 'check
(lambda _ (lambda _
@ -124,14 +133,16 @@
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
(utils (assoc-ref outputs "utils")) (utils (assoc-ref outputs "utils")))
(src "src/github.com/syncthing/syncthing/bin/")) (with-directory-excursion "src/github.com/syncthing/syncthing"
(install-file (string-append src "/syncthing") (install-file "syncthing" (string-append out "/bin"))
(string-append out "/bin")) (for-each (cut install-file <> utils)
(delete-file (string-append src "/syncthing")) '("stcli" "stcompdirs" "stcrashreceiver"
(copy-recursively "src/github.com/syncthing/syncthing/bin/" "stdisco" "stdiscosrv" "stevents" "stfileinfo"
(string-append utils "/bin")) "stfinddevice" "stfindignored" "stgenfiles"
#t))) "stindex" "strelaypoolsrv" "strelaysrv" "stsigtool"
"stvanity" "stwatchfile" "uraggregate" "ursrv"))
#t))))
(add-after 'install 'install-docs (add-after 'install 'install-docs
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
@ -920,7 +931,8 @@ system, kernel, and process metrics from the @file{/proc} pseudo file system.")
,go-github-com-prometheus-client-model) ,go-github-com-prometheus-client-model)
("go-github-com-prometheus-common" ("go-github-com-prometheus-common"
,go-github-com-prometheus-common) ,go-github-com-prometheus-common)
("go-github-com-prometheus-procfs" ,go-github-com-prometheus-procfs))) ("go-github-com-prometheus-procfs" ,go-github-com-prometheus-procfs)
("go-github-com-cespare-xxhash" ,go-github-com-cespare-xxhash)))
(synopsis "HTTP server and client tools for Prometheus") (synopsis "HTTP server and client tools for Prometheus")
(description "This package @code{promhttp} provides HTTP client and (description "This package @code{promhttp} provides HTTP client and
server tools for Prometheus metrics.") server tools for Prometheus metrics.")