2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2021-01-15 22:18:51 +00:00
|
|
|
, ncurses
|
2020-04-24 23:36:52 +00:00
|
|
|
, withLibrary ? false, libtool
|
|
|
|
, unicodeSupport ? true
|
|
|
|
, enableShared ? !stdenv.isDarwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert withLibrary -> libtool != null;
|
|
|
|
assert unicodeSupport -> ncurses.unicode && ncurses != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dialog";
|
2021-03-19 17:17:44 +00:00
|
|
|
version = "1.3-20210306";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
url = "ftp://ftp.invisible-island.net/dialog/${pname}-${version}.tgz";
|
2021-03-19 17:17:44 +00:00
|
|
|
hash = "sha256-pz57YHtjX2PAICuzMTEG5wD5H+Sp9NJspwA/brK5yw8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-rpath-hacks"
|
2021-02-05 17:12:51 +00:00
|
|
|
(lib.withFeature withLibrary "libtool")
|
|
|
|
"--with-ncurses${lib.optionalString unicodeSupport "w"}"
|
|
|
|
"--with-libtool-opts=${lib.optionalString enableShared "-shared"}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
installTargets = [ "install${lib.optionalString withLibrary "-full"}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://invisible-island.net/dialog/dialog.html";
|
|
|
|
description = "Display dialog boxes from shell";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres spacefrogg ];
|
|
|
|
platforms = ncurses.meta.platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|