2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-08-12 14:41:47 +00:00
|
|
|
, cmake
|
2022-01-13 20:06:32 +00:00
|
|
|
, libdeflate
|
2021-08-12 14:41:47 +00:00
|
|
|
, libunistring
|
|
|
|
, ncurses
|
2022-01-13 20:06:32 +00:00
|
|
|
, pandoc
|
|
|
|
, pkg-config
|
2021-09-22 15:38:15 +00:00
|
|
|
, zlib
|
2022-01-13 20:06:32 +00:00
|
|
|
, multimediaSupport ? true, ffmpeg
|
|
|
|
, qrcodegenSupport ? true, qrcodegen
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
2021-08-12 14:41:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-05 17:05:55 +00:00
|
|
|
pname = "notcurses";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "3.0.8";
|
2021-08-12 14:41:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dankamongmen";
|
|
|
|
repo = "notcurses";
|
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-5SNWk1iKDNbyoo413Qvzl2bGaR5Lb+q/UPbPQg7YvRU=";
|
2021-08-12 14:41:47 +00:00
|
|
|
};
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pandoc
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libdeflate
|
|
|
|
libunistring
|
|
|
|
ncurses
|
|
|
|
zlib
|
|
|
|
]
|
|
|
|
++ lib.optional qrcodegenSupport qrcodegen
|
|
|
|
++ lib.optional multimediaSupport ffmpeg;
|
|
|
|
|
|
|
|
cmakeFlags =
|
|
|
|
lib.optional (qrcodegenSupport) "-DUSE_QRCODEGEN=ON"
|
2021-01-05 17:05:55 +00:00
|
|
|
++ lib.optional (!multimediaSupport) "-DUSE_MULTIMEDIA=none";
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/dankamongmen/notcurses/issues/2661
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tools/notcurses-core.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
substituteInPlace tools/notcurses-ffi.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
substituteInPlace tools/notcurses++.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
substituteInPlace tools/notcurses.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
'';
|
|
|
|
|
2021-08-12 14:41:47 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
homepage = "https://github.com/dankamongmen/notcurses";
|
|
|
|
description = "Blingful TUIs and character graphics";
|
2021-01-05 17:05:55 +00:00
|
|
|
longDescription = ''
|
2022-01-13 20:06:32 +00:00
|
|
|
Notcurses is a library facilitating complex TUIs on modern terminal
|
|
|
|
emulators, supporting vivid colors, multimedia, and Unicode to the maximum
|
|
|
|
degree possible. Things can be done with Notcurses that simply can't be
|
|
|
|
done with NCURSES.
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
It is not a source-compatible X/Open Curses implementation, nor a
|
|
|
|
replacement for NCURSES on existing systems.
|
|
|
|
'';
|
2021-08-12 14:41:47 +00:00
|
|
|
license = licenses.asl20;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2022-01-13 20:06:32 +00:00
|
|
|
inherit (ncurses.meta) platforms;
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
}
|