projects/guix·blob java-team · refs

90 lines · 3.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 John Darrington <[email protected]>
3;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2022-2025 Efraim Flashner <[email protected]>
5;;;
6;;; This file is part of GNU Guix.
7;;;
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.
12;;;
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.
17;;;
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/>.
20
21(define-module (gnu packages ncdu)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages bash)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages ncurses)
26 #:use-module (gnu packages pkg-config)
27 #:use-module (gnu packages zig)
28 #:use-module (guix licenses)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix utils)
32 #:use-module (guix gexp)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system zig))
35
36(define-public ncdu-1
37 ;; This old version is ‘LTS’. Version 2 works fine and has more features,
38 ;; but Zig is still a fast-moving target and doesn't support cross-compilation
39 ;; yet, so we'll keep both for just a little longer.
40 (package
41 (name "ncdu")
42 (version "1.22")
43 (source (origin
44 (method url-fetch)
45 (uri (string-append "https://dev.yorhel.nl/download/ncdu-"
46 version ".tar.gz"))
47 (sha256
48 (base32
49 "0sqp39lkryjljvvrwv0x37a9fklg3g060iqhh42i5m84vjbc1mha"))))
50 (build-system gnu-build-system)
51 (arguments
52 (list #:configure-flags
53 ;; Configure default shell for spawning shell when $SHELL is not set
54 #~(list (string-append "--with-shell="
55 #$(this-package-input "bash-minimal")
56 "/bin/sh"))))
57 (native-inputs (list pkg-config))
58 (inputs (list bash-minimal ncurses))
59 (synopsis "Ncurses-based disk usage analyzer")
60 (description
61 "Ncdu is a disk usage analyzer with an ncurses interface, aimed to be
62run on a remote server where you don't have an entire graphical setup, but have
63to do with a simple SSH connection. ncdu aims to be fast, simple and easy to
64use, and should be able to run in any minimal POSIX-like environment with
65ncurses installed.")
66 (license (x11-style "file://COPYING"))
67 (home-page "https://dev.yorhel.nl/ncdu")))
68
69(define-public ncdu
70 (package
71 (inherit ncdu-1)
72 (name "ncdu")
73 (version "2.9.2")
74 (source (origin
75 (method url-fetch)
76 (uri (string-append "https://dev.yorhel.nl/download/ncdu-"
77 version ".tar.gz"))
78 (sha256
79 (base32
80 "1jffh675rpm3rfl0qk2ja9z1x6a6f8ksq2scrbr6jrdn3hl3a4g9"))))
81 (build-system zig-build-system)
82 (arguments
83 (list #:zig zig-0.14
84 #:install-source? #f
85 #:zig-release-type "safe"
86 #:zig-build-flags
87 #~(list "-Dpie")))
88 (inputs (list ncurses `(,zstd "lib")))
89 (native-inputs (list pkg-config))
90 (properties `((tunable? . #t)))))