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