Skip to content

Commit

Permalink
Merge pull request #265891 from kjeremy/ncurses-fix-cross2
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin committed Nov 8, 2023
2 parents 3271403 + 85dc823 commit b771463
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkgs/development/libraries/ncurses/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, stdenv
, fetchurl
, buildPackages
, ncurses
, pkg-config
, abiVersion ? "6"
, enableStatic ? stdenv.hostPlatform.isStatic
Expand Down Expand Up @@ -48,20 +49,20 @@ stdenv.mkDerivation (finalAttrs: {
"/usr/share/terminfo" # upstream default, probably all FHS-based distros
"/run/current-system/sw/share/terminfo" # NixOS
]}"
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"--with-build-cc=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
];

# 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
];

nativeBuildInputs = [
pkg-config
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
buildPackages.ncurses
# for `tic`, build already depends on for build `cc` so it's weird the build doesn't just build `tic`.
ncurses
];

buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
Expand Down

0 comments on commit b771463

Please sign in to comment.