2021-07-16 19:40:57 +00:00
|
|
|
{ stdenv, lib, fetchurl, meson, ninja, pkg-config
|
|
|
|
, gtk-doc, docbook-xsl-nons
|
|
|
|
, glib, ncurses, libxml2
|
|
|
|
, buildDocs ? true
|
2024-05-15 15:35:15 +00:00
|
|
|
, mesonEmulatorHook
|
2021-07-16 19:40:57 +00:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libgnt";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.14.3";
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ] ++ lib.optional buildDocs "devdoc";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/pidgin/${pname}-${version}.tar.xz";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-V/VFf3KZnQuxoTmjfydG7BtaAsCU8nEKM52LzqQjYSM=";
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ glib meson ninja pkg-config ]
|
|
|
|
++ lib.optionals buildDocs [ gtk-doc docbook-xsl-nons ]
|
|
|
|
++ lib.optionals (buildDocs && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
|
|
mesonEmulatorHook
|
|
|
|
];
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
buildInputs = [ glib ncurses libxml2 ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace meson.build --replace \
|
|
|
|
"ncurses_sys_prefix = '/usr'" \
|
|
|
|
"ncurses_sys_prefix = '${lib.getDev ncurses}'"
|
|
|
|
'';
|
2024-05-15 15:35:15 +00:00
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonBool "doc" buildDocs)
|
|
|
|
(lib.mesonBool "python2" false)
|
|
|
|
];
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Ncurses toolkit for creating text-mode graphical user interfaces";
|
2021-07-16 19:40:57 +00:00
|
|
|
homepage = "https://keep.imfreedom.org/libgnt/libgnt/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with lib.maintainers; [ ony ];
|
|
|
|
};
|
|
|
|
}
|