(define-module (gnu packages notcurses) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix build utils) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages gcc) #:use-module (gnu packages video) #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) #:use-module (gnu packages compression) #:use-module (gnu packages libunistring) #:use-module (ice-9 match)) (define-public notcurses (let ((commit "d15eb6003cbd65f11163916261cf6cd5600c77fa")) (package (name "notcurses") (version "2.4.9") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/dankamongmen/notcurses") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "10jf6iai1r0xafrgaz978y9bqlaw1gvd11gc0yynwwp6rcs97g17")))) (build-system cmake-build-system) (arguments `(#:tests? #f #:build-type "-DVAR=val" #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")) "CC=gcc") #:configure-flags (map (lambda (s) (string-append "-D" s)) '("USE_CPP=off" "USE_COVERAGE=off" "USE_DOXYGEN=off" "USE_DOCTEST=off" "USE_GPM=off" "USE_MULTIMEDIA=ffmpeg" "USE_PANDOC=off" "FSG_BUILD=ON")) #:phases (modify-phases %standard-phases (add-before 'build 'patch-makefile-shell (lambda _ (setenv "HOME" "/tmp"))) (add-before 'build 'set-prefix-in-makefile (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* "Makefile" (("PREFIX =.*") (string-append "PREFIX = " out "\n"))) #true)))))) (native-inputs `(("ncurses" ,ncurses) ("gcc-toolchain" ,gcc-10) ("pkg-config" ,pkg-config))) (inputs `(("zlib" ,zlib) ("ffmpeg" ,ffmpeg) ("libunistring" ,libunistring))) (synopsis "Not-ncurses: A library facilitating complex TUIs on modern terminals") (description "Supporting vivid colors, multimedia, threads, & Unicode to the max.") (home-page "https://notcurses.com/html/") (license license:asl2.0))))