Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #265891 from kjeremy/ncurses-fix-cross2

authored by Artturi and committed by GitHub b7714638 3271403d

+5 -4
+5 -4
pkgs/development/libraries/ncurses/default.nix
··· 2 , stdenv 3 , fetchurl 4 , buildPackages 5 , pkg-config 6 , abiVersion ? "6" 7 , enableStatic ? stdenv.hostPlatform.isStatic ··· 48 "/usr/share/terminfo" # upstream default, probably all FHS-based distros 49 "/run/current-system/sw/share/terminfo" # NixOS 50 ]}" 51 ]; 52 53 # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: 54 CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; 55 56 strictDeps = true; 57 - depsBuildBuild = [ 58 - buildPackages.stdenv.cc 59 - ]; 60 61 nativeBuildInputs = [ 62 pkg-config 63 ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 64 - buildPackages.ncurses 65 ]; 66 67 buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
··· 2 , stdenv 3 , fetchurl 4 , buildPackages 5 + , ncurses 6 , pkg-config 7 , abiVersion ? "6" 8 , enableStatic ? stdenv.hostPlatform.isStatic ··· 49 "/usr/share/terminfo" # upstream default, probably all FHS-based distros 50 "/run/current-system/sw/share/terminfo" # NixOS 51 ]}" 52 + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 53 + "--with-build-cc=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" 54 ]; 55 56 # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: 57 CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; 58 59 strictDeps = true; 60 61 nativeBuildInputs = [ 62 pkg-config 63 ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 64 + # for `tic`, build already depends on for build `cc` so it's weird the build doesn't just build `tic`. 65 + ncurses 66 ]; 67 68 buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;