1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages ncdu)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages ncurses)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix utils)
28 #:use-module (guix gexp)
29 #:use-module (guix build-system gnu)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages zig))
39 (uri (string-append "https://dev.yorhel.nl/download/ncdu-"
43 "1wfvdajln0iy7364nxkg4bpgdv8l3b6a9bnkhy67icqsxnl4a1w1"))))
44 (build-system gnu-build-system)
45 (inputs (list ncurses))
46 (synopsis "Ncurses-based disk usage analyzer")
48 "Ncdu is a disk usage analyzer with an ncurses interface, aimed to be
49 run on a remote server where you don't have an entire graphical setup, but have
50 to do with a simple SSH connection. ncdu aims to be fast, simple and easy to
51 use, and should be able to run in any minimal POSIX-like environment with
54 (string-append "https://g.blicky.net/ncdu.git/plain/COPYING?id=v"
56 (home-page "https://dev.yorhel.nl/ncdu")))
61 (name "ncdu2") ; To destinguish it from the C based version.
65 (uri (string-append "https://dev.yorhel.nl/download/ncdu-"
69 "1p66691xgpljx1y92b4bfpn5rr7gnwbr5x3bf8bc78qq6vq6w3cy"))))
73 #~(list (string-append "PREFIX=" #$output)
74 (string-append "CC=" #$(cc-for-target)))
76 #~(modify-phases %standard-phases
77 (delete 'configure) ; No configure script.
78 (add-before 'build 'pre-build
80 (setenv "ZIG_GLOBAL_CACHE_DIR"
81 (mkdtemp "/tmp/zig-cache-XXXXXX"))))
82 (add-after 'build 'build-manpage
84 (delete-file "ncdu.1")
85 (invoke "make" "doc")))
87 (lambda* (#:key tests? #:allow-other-keys)
89 (invoke "zig" "test" "build.zig")))))))
92 (properties `((upstream-name . "ncdu")))))