diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-10-09 23:04:56 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-10-10 17:51:30 -0300 |
commit | a68655c5eb93bc593f23a16b64a63edf9d2d9d21 (patch) | |
tree | 89d3f782cbb1848b4860d201f7940be5d00c1f77 /pkgs/by-name/di | |
parent | 50240f732b4acbdc1180c897aa6ce38a82168814 (diff) |
dialog: migrate to by-name
Diffstat (limited to 'pkgs/by-name/di')
-rw-r--r-- | pkgs/by-name/di/dialog/package.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/by-name/di/dialog/package.nix b/pkgs/by-name/di/dialog/package.nix new file mode 100644 index 0000000000000..23f75bb1c994f --- /dev/null +++ b/pkgs/by-name/di/dialog/package.nix @@ -0,0 +1,50 @@ +{ 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; + }; +}) |