From c4e49d75986b362820ce413152300f7682ca349b Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 29 Apr 2023 23:28:11 +0200 Subject: gnu: browserpass-native: Use new package style. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/password-utils.scm (browserpass-native)[arguments]: Use gexps. Drop trailing #t from phases. Signed-off-by: Ludovic Courtès --- gnu/packages/password-utils.scm | 71 ++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 08416a8503..db22f257f1 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -965,46 +965,37 @@ (define-public browserpass-native (base32 "1if72k526sqqxnw250qwxvzwvh1w0k8ag4p4xq3442b22hywx72i")))) (build-system go-build-system) (arguments - `(#:import-path "github.com/browserpass/browserpass-native" - #:install-source? #f - #:phases - (modify-phases %standard-phases - (add-before 'build 'patch-makefile - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; This doesn't go in #:make-flags because the Makefile itself - ;; gets installed. - (substitute* - "src/github.com/browserpass/browserpass-native/Makefile" - (("PREFIX \\?= /usr") - (string-append "PREFIX ?= " out))) - #t))) - (add-before 'build 'configure - (lambda _ - (with-directory-excursion - "src/github.com/browserpass/browserpass-native" - (invoke "make" "configure")) - #t)) - (replace 'build - (lambda _ - (with-directory-excursion - "src/github.com/browserpass/browserpass-native" - (invoke "make")) - #t)) - (replace 'install - (lambda _ - (with-directory-excursion - "src/github.com/browserpass/browserpass-native" - (invoke "make" "install")) - #t)) - (add-after 'install 'wrap-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gnupg (assoc-ref inputs "gnupg"))) - (wrap-program (string-append out "/bin/browserpass") - `("PATH" ":" prefix - (,(string-append gnupg "/bin")))) - #t)))))) + (list #:import-path "github.com/browserpass/browserpass-native" + #:install-source? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'patch-makefile + (lambda _ + ;; This doesn't go in #:make-flags because the Makefile + ;; itself gets installed. + (substitute* "src/github.com/browserpass/browserpass-native/Makefile" + (("PREFIX \\?= /usr") + (string-append "PREFIX ?= " #$output))))) + (add-before 'build 'configure + (lambda _ + (with-directory-excursion + "src/github.com/browserpass/browserpass-native" + (invoke "make" "configure")))) + (replace 'build + (lambda _ + (with-directory-excursion + "src/github.com/browserpass/browserpass-native" + (invoke "make")))) + (replace 'install + (lambda _ + (with-directory-excursion + "src/github.com/browserpass/browserpass-native" + (invoke "make" "install")))) + (add-after 'install 'wrap-executable + (lambda _ + (wrap-program (string-append #$output "/bin/browserpass") + `("PATH" ":" prefix + (,(string-append #$(this-package-input "gnupg") "/bin"))))))))) (native-inputs (list which)) (inputs -- cgit v1.2.3