summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2023-12-04 16:48:39 +0100
committerHilton Chain <hako@ultrarare.space>2023-12-10 11:09:09 +0800
commit20223da2f21cb1a0879aaed4b915305d1f197522 (patch)
treea944528e4bbaece4b1c41907f460ccb18aae540b
parent92640eedcad74023fdcea529077524fd44f3d307 (diff)
gnu: ncdu: Use zig-build-system.
* gnu/packages/ncdu.scm (ncdu)[build-system]: Use zig-build-system. [arguments]<#:make-flags>: Remove argument. <#:phases>: Delegate phase manipulation to the build-system. Remove 'validate-runpath. [native-inputs]: Remove zig-0.10. Change-Id: I9027a1cbd925cfb0c135740e81a33b62cb9d91ca Signed-off-by: Hilton Chain <hako@ultrarare.space>
-rw-r--r--gnu/packages/ncdu.scm24
1 files changed, 6 insertions, 18 deletions
diff --git a/gnu/packages/ncdu.scm b/gnu/packages/ncdu.scm
index 30460b404d..7b93dab9f6 100644
--- a/gnu/packages/ncdu.scm
+++ b/gnu/packages/ncdu.scm
@@ -21,14 +21,14 @@
(define-module (gnu packages ncdu)
#:use-module (gnu packages)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages perl)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (guix build-system gnu)
- #:use-module (gnu packages perl)
- #:use-module (gnu packages zig))
+ #:use-module (guix build-system zig))
(define-public ncdu-1
;; This old version is ‘LTS’. Version 2 works fine and has more features,
@@ -73,28 +73,16 @@ ncurses installed.")
#~(begin
;; Delete a pregenerated man page. We'll build it ourselves.
(delete-file "ncdu.1")))))
+ (build-system zig-build-system)
(arguments
(list
- #:make-flags
- #~(list (string-append "PREFIX=" #$output)
- (string-append "CC=" #$(cc-for-target))
- (string-append "ZIG_FLAGS=-Drelease-fast"))
#:phases
#~(modify-phases %standard-phases
- (delete 'configure) ; No configure script.
- (add-before 'build 'pre-build
- (lambda _
- (setenv "ZIG_GLOBAL_CACHE_DIR"
- (mkdtemp "/tmp/zig-cache-XXXXXX"))))
+ (delete 'validate-runpath)
(add-after 'build 'build-manpage
(lambda _
- (invoke "make" "doc")))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "zig" "test" "build.zig")))))))
- (native-inputs
- (list perl zig-0.10))
+ (invoke "make" "doc"))))))
+ (native-inputs (list perl))
(properties `((tunable? . #t)))))
(define-public ncdu-2