gnu: RHash: Turn arguments into gexp.

* gnu/packages/crypto.scm (rhash)[arguments]: Turn into gexp, and use #$OUTPUT
instead of the %OUTPUT variable.
This commit is contained in:
Marius Bakke 2021-07-17 13:25:36 +02:00
parent 2c6464e48b
commit c5ba4725de
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -81,6 +81,7 @@ (define-module (gnu packages crypto)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix build-system cargo) #:use-module (guix build-system cargo)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module (guix build-system copy) #:use-module (guix build-system copy)
@ -903,37 +904,37 @@ (define-public rhash
"15x28khy4k3sa0cfcyi13vj50d2nd7dha2p3gkq7i6z66ckq2323")))) "15x28khy4k3sa0cfcyi13vj50d2nd7dha2p3gkq7i6z66ckq2323"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags (list #:configure-flags
(list (string-append "--prefix=" (assoc-ref %outputs "out")) #~(list (string-append "--prefix=" #$output)
,@(let ((target (%current-target-system))) #$@(let ((target (%current-target-system)))
(if target (if target
`((string-append "--target=" ,target) #~((string-append "--target=" #$target)
(string-append "--cc=" (string-append "--cc="
(assoc-ref %build-inputs "cross-gcc") (assoc-ref %build-inputs "cross-gcc")
"/bin/" ,target "-gcc")) "/bin/" #$target "-gcc"))
'()))) #~())))
#:make-flags #:make-flags
;; The binaries in /bin need some help finding librhash.so.0. ;; The binaries in /bin need some help finding librhash.so.0.
(list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
#:test-target "test" ; make check just checks the sources #:test-target "test" ; make check just checks the sources
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(replace 'configure (delete 'configure)
;; ./configure is not GNU autotools' and doesn't gracefully handle (add-before 'build 'configure
;; unrecognized options, so we must call it manually. ;; ./configure is not GNU autotools' and doesn't gracefully handle
(lambda* (#:key configure-flags #:allow-other-keys) ;; unrecognized options, so we must call it manually.
(apply invoke "./configure" configure-flags))) (lambda* (#:key configure-flags #:allow-other-keys)
(add-before 'check 'patch-/bin/sh (apply invoke "./configure" configure-flags)))
(lambda _ (add-before 'check 'patch-/bin/sh
(substitute* "Makefile" (lambda _
(("/bin/sh") (which "sh"))) (substitute* "Makefile"
#t)) (("/bin/sh") (which "sh")))))
(add-after 'install 'install-library-extras (add-after 'install 'install-library-extras
(lambda* (#:key make-flags #:allow-other-keys) (lambda* (#:key make-flags #:allow-other-keys)
(apply invoke (apply invoke
"make" "-C" "librhash" "make" "-C" "librhash"
"install-lib-headers" "install-so-link" "install-lib-headers" "install-so-link"
make-flags)))))) make-flags))))))
(home-page "https://sourceforge.net/projects/rhash/") (home-page "https://sourceforge.net/projects/rhash/")
(synopsis "Utility for computing hash sums") (synopsis "Utility for computing hash sums")
(description "RHash is a console utility for calculation and verification (description "RHash is a console utility for calculation and verification