@@ -27,8 +27,8 @@ (define-module (gnu packages ncdu)
#: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)
+ #:use-module (gnu packages perl))
(define-public ncdu-1
;; This old version is ‘LTS’. Version 2 works fine and has more features,
@@ -73,28 +73,16 @@ (define-public ncdu
#~(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