diff options
author | Guillaume Girol <symphorien@users.noreply.github.com> | 2022-06-25 09:54:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-25 09:54:18 +0000 |
commit | a898e689b7450df275b0a611c3ba413adef1aafc (patch) | |
tree | 9d8e40e241abb98e7dd0633b494536f613c9800a | |
parent | 66e8dceabcd021ed8d96b578eb4a3696ca8dd0f2 (diff) | |
parent | 8fa427ef9f4f7caa3b7c9ac218e83cd0ba2cae6d (diff) | |
download | nixpkgs-a898e689b7450df275b0a611c3ba413adef1aafc.tar nixpkgs-a898e689b7450df275b0a611c3ba413adef1aafc.tar.gz nixpkgs-a898e689b7450df275b0a611c3ba413adef1aafc.tar.bz2 nixpkgs-a898e689b7450df275b0a611c3ba413adef1aafc.tar.lz nixpkgs-a898e689b7450df275b0a611c3ba413adef1aafc.tar.xz nixpkgs-a898e689b7450df275b0a611c3ba413adef1aafc.tar.zst nixpkgs-a898e689b7450df275b0a611c3ba413adef1aafc.zip |
Merge pull request #172892 from midchildan/fix/ncurses-static
ncurses: make static binaries not depend on Nix store paths
-rw-r--r-- | pkgs/development/libraries/ncurses/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 72d64854238..2cfe41956a4 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -41,7 +41,17 @@ stdenv.mkDerivation rec { ++ lib.optionals stdenv.hostPlatform.isWindows [ "--enable-sp-funcs" "--enable-term-driver" - ]; + ] ++ lib.optionals (stdenv.hostPlatform.isUnix && stdenv.hostPlatform.isStatic) [ + # For static binaries, the point is to have a standalone binary with + # minimum dependencies. So here we make sure that binaries using this + # package won't depend on a terminfo database located in the Nix store. + "--with-terminfo-dirs=${lib.concatStringsSep ":" [ + "/etc/terminfo" # Debian, Fedora, Gentoo + "/lib/terminfo" # Debian + "/usr/share/terminfo" # upstream default, probably all FHS-based distros + "/run/current-system/sw/share/terminfo" # NixOS + ]}" + ]; # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; |