depot/third_party/nixpkgs/pkgs/by-name/di/dialog/package.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

50 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchurl
, libtool
, ncurses
, enableShared ? !stdenv.isDarwin && !stdenv.hostPlatform.isStatic
, unicodeSupport ? true
, withLibrary ? true
}:
assert unicodeSupport -> ncurses.unicodeSupport;
stdenv.mkDerivation (finalAttrs: {
pname = "dialog";
version = "1.3-20231002";
src = fetchurl {
url = "https://invisible-island.net/archives/dialog/dialog-${finalAttrs.version}.tgz";
hash = "sha256-MVZAqwcZIl1cvKsTBYXAXweR/PBzBypf6UeZaaorgzs=";
};
nativeBuildInputs = lib.optionals withLibrary [
libtool
];
buildInputs = [
ncurses
];
strictDeps = true;
configureFlags = [
"--disable-rpath-hacks"
"--${if withLibrary then "with" else "without"}-libtool"
"--with-libtool-opts=${lib.optionalString enableShared "-shared"}"
"--with-ncurses${lib.optionalString unicodeSupport "w"}"
];
installTargets = [
"install${lib.optionalString withLibrary "-full"}"
];
meta = {
homepage = "https://invisible-island.net/dialog/dialog.html";
description = "Display dialog boxes from shell";
license = lib.licenses.lgpl21Plus;
mainProgram = "dialog";
maintainers = with lib.maintainers; [ AndersonTorres spacefrogg ];
inherit (ncurses.meta) platforms;
};
})