diff options
author | Sharlatan Hellseher <[email protected]> | 2025-02-12 21:53:00 +0000 |
---|---|---|
committer | Sharlatan Hellseher <[email protected]> | 2025-02-12 21:58:51 +0000 |
commit | 9a7b842ebb2f03b19e9b145e7d8a5751e1517dab (patch) | |
tree | 063be4321904c73e7ce1a4d7c068104fe7981333 | |
parent | d0c2dc4ed1b4a8df8600e59a2c6906e375255ccc (diff) |
gnu: aerc: Improve package style.
* gnu/packages/mail.scm (aerc): Rewrite with THIS-PACKAGE-INPUT and
FORMAT to improve the flow and refresh the style.
[phases] {install}: Respespect GOFLAGS from the go-build-system, apply
CC-FOR-TARGET
Change-Id: I52aac55f10909f800f3a43e59443691b2b576d80
-rw-r--r-- | gnu/packages/mail.scm | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 355fb964e3..90bbbe0498 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -60,6 +60,7 @@ ;;; Copyright © 2024 Zheng Junjie <[email protected]> ;;; Copyright © 2024 Ashish SHUKLA <[email protected]> ;;; Copyright © 2025 Tanguy Le Carrour <[email protected]> +;;; Copyright © 2025 Sharlatan Hellseher <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -5101,33 +5102,37 @@ remote SMTP server.") ;; Patch all occurrences to "sh" with absolute path to ;; the shell available in Guix. (("\"sh\"") - (string-append - "\"" (search-input-file inputs "bin/sh") - "\""))) - (let ((zoxide (search-input-file inputs "bin/zoxide"))) + (format #f "~s" (which "sh")))) + (let ((zoxide #$(this-package-input "zoxide"))) (when zoxide (substitute* "commands/z.go" (("\"zoxide\"") - (string-append "\"" zoxide "\""))))) + (format #f "~s" + (string-append zoxide "/bin/zoxide")))))) (substitute* (list "lib/crypto/gpg/gpg.go" "lib/crypto/gpg/gpg_test.go" "lib/crypto/gpg/gpgbin/keys.go" "lib/crypto/gpg/gpgbin/gpgbin.go") (("\"gpg\"") - (string-append - "\"" (search-input-file inputs "bin/gpg") - "\"")) + (format #f "~s" + (string-append #$(this-package-input "gnupg") + "/bin/gpg"))) (("strings\\.Contains\\(stderr\\.String\\(\\), .*\\)") "strings.Contains(stderr.String(), \"gpg\")"))))) (add-after 'build 'doc (lambda* (#:key import-path build-flags #:allow-other-keys) (invoke "make" "doc" "-C" (string-append "src/" import-path)))) + ;; XXX: This phase does the build and overwrites + ;; go-build-system's build one. (replace 'install (lambda* (#:key import-path build-flags #:allow-other-keys) - (invoke "make" "CC=gcc" "GOFLAGS=-tags=notmuch" "install" "-C" - (string-append "src/" import-path) - (string-append "PREFIX=" #$output))))))) + (invoke "make" + (string-append "CC=" #$(cc-for-target)) + (string-append "GOFLAGS=-tags=notmuch " (getenv "GOFLAGS")) + (string-append "PREFIX=" #$output) + "install" "-C" + (string-append "src/" import-path))))))) (inputs (append (list gnupg |