diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ncurses')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/ncurses/default.nix | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ncurses/default.nix b/nixpkgs/pkgs/development/libraries/ncurses/default.nix index 2cfe41956a4b..c79f1c908993 100644 --- a/nixpkgs/pkgs/development/libraries/ncurses/default.nix +++ b/nixpkgs/pkgs/development/libraries/ncurses/default.nix @@ -8,19 +8,16 @@ , withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt , mouseSupport ? false, gpm , unicodeSupport ? true +, testers }: -stdenv.mkDerivation rec { - ver = "6.3"; - # We pick fresh intermediate release to get a fix for CVE-2022-29458 - # which was fixed in 20220416 patchset. - patchver = "20220507"; - version = "${ver}-p${patchver}"; +stdenv.mkDerivation (finalAttrs: { + version = "6.4"; pname = "ncurses" + lib.optionalString (abiVersion == "5") "-abi5-compat"; src = fetchurl { - url = "https://invisible-island.net/archives/ncurses/current/ncurses-${ver}-${patchver}.tgz"; - sha256 = "02y4n4my5qqhw3fdhdjv1zc9xpyglzlzmzjwq2zcwbwv738255ja"; + url = "https://invisible-island.net/archives/ncurses/ncurses-${finalAttrs.version}.tar.gz"; + hash = "sha256-aTEoPZrIfFBz8wtikMTHXyFjK7T8NgOsgQCBK+0kgVk="; }; outputs = [ "out" "dev" "man" ]; @@ -56,6 +53,7 @@ stdenv.mkDerivation rec { # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; + strictDeps = true; depsBuildBuild = [ buildPackages.stdenv.cc ]; @@ -173,11 +171,20 @@ stdenv.mkDerivation rec { ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp! ''; license = licenses.mit; + pkgConfigModules = let + base = [ + "form" + "menu" + "ncurses" + "panel" + ] ++ lib.optional withCxx "ncurses++"; + in base ++ lib.optionals unicodeSupport (map (p: p + "w") base); platforms = platforms.all; }; passthru = { ldflags = "-lncurses"; inherit unicodeSupport abiVersion; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; }; -} +}) |