gnu: redis: Use gexps and streamline.

* gnu/packages/databases.scm (redis) [arguments]: Merge the use-correct-tclsh
into the patch-paths phase.  Use 'which' instead of assoc-ref.  Move
the #:make-flags argument before the #:phases one.  Use cc-for-target as the
value of the CC make flag.
[native-inputs]: Move field below arguments.
This commit is contained in:
Maxim Cournoyer 2023-03-05 15:24:38 -05:00
parent 458b791f35
commit 4413b09fa3
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -2455,21 +2455,20 @@ similar to BerkeleyDB, LevelDB, etc.")
;; Delete bundled jemalloc, as the package will use the libc one ;; Delete bundled jemalloc, as the package will use the libc one
'(begin (delete-file-recursively "deps/jemalloc"))))) '(begin (delete-file-recursively "deps/jemalloc")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs
(list pkg-config procps tcl which))
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:make-flags #~(list #$(string-append "CC=" (cc-for-target))
"MALLOC=libc"
"LDFLAGS=-ldl"
(string-append "PREFIX=" #$output))
#:phases
#~(modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(add-after 'unpack 'use-correct-tclsh
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "runtest"
(("^TCLSH=.*")
(string-append "TCLSH="
(assoc-ref inputs "tcl")
"/bin/tclsh")))))
(add-after 'unpack 'patch-paths (add-after 'unpack 'patch-paths
(lambda _ (lambda _
(substitute* "runtest"
(("^TCLSH=.*")
(string-append "TCLSH=" (which "tclsh"))))
(substitute* "tests/support/server.tcl" (substitute* "tests/support/server.tcl"
(("/usr/bin/env") (("/usr/bin/env")
(which "env"))))) (which "env")))))
@ -2485,12 +2484,8 @@ similar to BerkeleyDB, LevelDB, etc.")
(("integration/failover") "") (("integration/failover") "")
(("integration/replication-4") "") (("integration/replication-4") "")
(("integration/replication-psync") "") (("integration/replication-psync") "")
(("integration/replication[^-]") ""))))) (("integration/replication[^-]") "")))))))
#:make-flags `("CC=gcc" (native-inputs (list pkg-config procps tcl which))
"MALLOC=libc"
"LDFLAGS=-ldl"
,(string-append "PREFIX="
(assoc-ref %outputs "out")))))
(synopsis "Key-value cache and store") (synopsis "Key-value cache and store")
(description "Redis is an advanced key-value cache and store. Redis (description "Redis is an advanced key-value cache and store. Redis
supports many data structures including strings, hashes, lists, sets, sorted supports many data structures including strings, hashes, lists, sets, sorted