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";
|
2022-01-07 04:07:37 +00:00
|
|
|
version = "1.3-20211214";
|
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";
|
2022-01-07 04:07:37 +00:00
|
|
|
hash = "sha256-zCll4FxqjDcHCza1ZBTqpWDfjYfyzqIXWeKJUOmyeks=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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-08-05 21:33:18 +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 ];
|
2022-01-07 04:07:37 +00:00
|
|
|
inherit (ncurses.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|