diff options
Diffstat (limited to 'pkgs/tools/misc/dialog/default.nix')
-rw-r--r-- | pkgs/tools/misc/dialog/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/tools/misc/dialog/default.nix b/pkgs/tools/misc/dialog/default.nix new file mode 100644 index 00000000000..744f55aed10 --- /dev/null +++ b/pkgs/tools/misc/dialog/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchurl +, ncurses +, withLibrary ? false, libtool +, unicodeSupport ? true +, enableShared ? !stdenv.isDarwin +}: + +assert withLibrary -> libtool != null; +assert unicodeSupport -> ncurses.unicode && ncurses != null; + +stdenv.mkDerivation rec { + pname = "dialog"; + version = "1.3-20210324"; + + src = fetchurl { + url = "ftp://ftp.invisible-island.net/dialog/${pname}-${version}.tgz"; + hash = "sha256-AcLR4umvmwg+ogDKrQhP39pVF41bv05Cyf/0STUVFlM="; + }; + + buildInputs = [ + ncurses + ]; + + configureFlags = [ + "--disable-rpath-hacks" + (lib.withFeature withLibrary "libtool") + "--with-ncurses${lib.optionalString unicodeSupport "w"}" + "--with-libtool-opts=${lib.optionalString enableShared "-shared"}" + ]; + + installTargets = [ "install${lib.optionalString withLibrary "-full"}" ]; + + meta = with lib; { + homepage = "https://invisible-island.net/dialog/dialog.html"; + description = "Display dialog boxes from shell"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ AndersonTorres spacefrogg ]; + platforms = ncurses.meta.platforms; + }; +} |