depot/third_party/nixpkgs/pkgs/tools/misc/dialog/default.nix
Default email 3e7541c14f Project import generated by Copybara.
GitOrigin-RevId: ff377a78794d412a35245e05428c8f95fef3951f
2022-01-07 12:07:37 +08:00

44 lines
1.1 KiB
Nix

{ 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-20211214";
src = fetchurl {
url = "ftp://ftp.invisible-island.net/dialog/${pname}-${version}.tgz";
hash = "sha256-zCll4FxqjDcHCza1ZBTqpWDfjYfyzqIXWeKJUOmyeks=";
};
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 ];
inherit (ncurses.meta) platforms;
};
}