summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-07-19 14:06:06 +0200
committerAndreas Enge <andreas@enge.fr>2025-07-19 15:36:29 +0200
commite899b9a20e0dda8e676ba80dbfee3b4e85af2371 (patch)
tree52d63e151487c3c6a6ca3c7bde082d3f43d89cf5
parente848419d928008d903b35c8bb0a254ad9cffa8dc (diff)
gnu: c-reduce: Improve phases.
It's not necessary to search for each perl input because they are already set by the build-system in PERL5LIB. * gnu/packages/debug.scm (c-reduce)[arguments]<#:phases>: Switch to gexps. Improve phase 'set-load-paths readability. Change-Id: I0d073b5994526bce3aac4b1147fa923f5ccdf00e Signed-off-by: Andreas Enge <andreas@enge.fr>
-rw-r--r--gnu/packages/debug.scm38
1 files changed, 14 insertions, 24 deletions
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index b489bee72b..cbcda4057a 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -157,30 +157,20 @@ program to exhibit a bug.")
("regex-common" ,perl-regexp-common)
("term-readkey" ,perl-term-readkey)))
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (with-directory-excursion "tests"
- ;; Running all tests can take a looong time, and tests 4 and 5
- ;; require frama-c or kcc. So run just one for sanity.
- (invoke "./run_tests" "1"))))
- (add-after 'install 'set-load-paths
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Tell creduce where to find the perl modules it needs.
- (let* ((out (assoc-ref outputs "out"))
- (prog (string-append out "/bin/creduce")))
- (wrap-program
- prog
- `("PERL5LIB" ":" prefix
- ,(map (lambda (p)
- (string-append (assoc-ref inputs p)
- "/lib/perl5/site_perl/"
- ,(package-version perl)))
- '("term-readkey" "exporter-lite"
- "file-which" "getopt-tabular"
- "regex-common")))))
- #t)))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (with-directory-excursion "tests"
+ ;; Running all tests can take a looong time, and tests 4 and 5
+ ;; require frama-c or kcc. So run just one for sanity.
+ (invoke "./run_tests" "1"))))
+ (add-after 'install 'set-load-paths
+ (lambda _
+ ;; Tell creduce where to find the perl modules it needs.
+ (wrap-program (string-append #$output "/bin/creduce")
+ `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))))))
(home-page "https://embed.cs.utah.edu/creduce")
(synopsis "Reducer for interesting code")
(description