From 584e77abd541ac5e0227639597241f3f28d139b6 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 12 Apr 2024 13:43:54 +0100 Subject: gnu: restic-rest-server: Refresh package style. * gnu/packages/backup.scm (restic-rest-server): Use G-expressions. [arguments] <#:phases>: Swap back to standard 'check phase and add 'set-tmpdir phase. [native-inputs]: Swap from propagated-inputs to native-inputs, sort alphabetically. Change-Id: I5010a2dd81b887d8ef10fa27b3ffcb228e08fade --- gnu/packages/backup.scm | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 699f4cbc8f..521974f96b 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -1076,30 +1076,29 @@ precious backup space. "1nvmxc9x0mlks6yfn66fmwn50k5q83ip4g9vvb0kndzd7hwcyacy")))) (build-system go-build-system) (arguments - '(#:import-path "github.com/restic/rest-server/cmd/rest-server" - #:unpack-path "github.com/restic/rest-server" - #:install-source? #f ;all we need is the binary - #:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys . args) - (when tests? - ;; Unit tests seems to break with Guix' non-standard TMPDIR. - (setenv "TMPDIR" "/tmp") - (apply (assoc-ref %standard-phases - 'check) args)))) - (add-after 'install 'rename-binary - (lambda* (#:key outputs #:allow-other-keys) - (with-directory-excursion (assoc-ref outputs "out") - ;; "rest-server" is a bit too generic. - (rename-file "bin/rest-server" - "bin/restic-rest-server"))))))) - (propagated-inputs (list go-golang-org-x-crypto - go-github-com-spf13-cobra - go-github-com-prometheus-client-golang - go-github-com-miolini-datacounter - go-github-com-minio-sha256-simd - go-github-com-gorilla-handlers - go-github-com-coreos-go-systemd-activation)) + (list + #:install-source? #f + #:import-path "github.com/restic/rest-server/cmd/rest-server" + #:unpack-path "github.com/restic/rest-server" + #:phases + #~(modify-phases %standard-phases + ;; Unit tests seems to break with Guix' non-standard TMPDIR. + (add-before 'check 'set-tmpdir + (lambda _ + (setenv "TMPDIR" "/tmp"))) + (add-after 'install 'rename-binary + (lambda _ + (with-directory-excursion #$output + ;; "rest-server" is a bit too generic. + (rename-file "bin/rest-server" + "bin/restic-rest-server"))))))) + (native-inputs (list go-github-com-coreos-go-systemd-activation + go-github-com-gorilla-handlers + go-github-com-minio-sha256-simd + go-github-com-miolini-datacounter + go-github-com-prometheus-client-golang + go-github-com-spf13-cobra + go-golang-org-x-crypto)) (home-page "https://github.com/restic/rest-server") (synopsis "Restic REST server") (description -- cgit v1.2.3