projects/guix·blob java-team · refs

92 lines · 3.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2021 Blake Shaw <[email protected]>
3;;; Copyright © 2022 Marius Bakke <[email protected]>
4;;; Copyright © 2023 Efraim Flashner <[email protected]>
5;;; Copyright © 2025 Andreas Enge <[email protected]>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages notcurses)
23 #:use-module (guix utils)
24 #:use-module (gnu packages)
25 #:use-module (guix packages)
26 #:use-module (guix build utils)
27 #:use-module (guix download)
28 #:use-module (guix build-system cmake)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (gnu packages check)
31 #:use-module (gnu packages haskell-xyz)
32 #:use-module (gnu packages video)
33 #:use-module (gnu packages ncurses)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages libunistring))
37
38(define-public notcurses
39 (package
40 (name "notcurses")
41 (version "3.0.16")
42 (source
43 (origin
44 (method url-fetch)
45 ;; Note: the upstream git repository contains non-free media (see the
46 ;; documentation for DFSG_BUILD; but the project provides a sanitized
47 ;; tarball for distributions. If switching to a git source, we need
48 ;; to find a way to elide the non-free demos with a source 'snippet'.
49 (uri (string-append "https://github.com/dankamongmen/notcurses/releases"
50 "/download/v" version "/notcurses_" version
51 "+dfsg.orig.tar.xz"))
52 (file-name (string-append name "-" version ".tar.xz"))
53 (sha256
54 (base32 "074pq81rf4jhlrsq12dv44w840lv3kkibaj612gj5wm79wiw7bgk"))))
55 (build-system cmake-build-system)
56 (arguments
57 `(#:make-flags
58 (list (string-append "CC=" ,(cc-for-target)))
59 ;; These flags are documented in 'INSTALL.md' in the source distribution.
60 #:configure-flags
61 '( ;; Do not build "coverage"
62 "-DUSE_COVERAGE=off"
63 ;; Do not build HTML documentation
64 "-DUSE_DOXYGEN=off"
65 ;; Unfortunately this disables the manpages.
66 ,@(if (supported-package? pandoc)
67 '()
68 '("-DUSE_PANDOC=off"))
69 ;; Don't include mouse support
70 "-DUSE_GPM=off"
71 ;; Use FFmpeg for multimedia support
72 "-DUSE_MULTIMEDIA=ffmpeg"
73 ;; Follow the Debian Free Software Guidelines, omitting nonfree content.
74 "-DDFSG_BUILD=ON")))
75 (native-inputs
76 (append
77 (list pkg-config)
78 (if (supported-package? pandoc)
79 (list pandoc)
80 '())
81 (list doctest)))
82 (inputs
83 (list ffmpeg
84 libdeflate
85 libunistring
86 ncurses
87 zlib))
88 (synopsis "Textual user interfaces")
89 (description "Notcurses is a library for building complex textual user
90interfaces on modern terminals.")
91 (home-page "https://notcurses.com")
92 (license license:asl2.0)))