From 85dc823b2ffc9a0a49c3265b71ed959f023b10f6 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 2 Nov 2023 13:09:24 -0400 Subject: [PATCH] ncurses: fix splicing Fixes warnings with #263082 applied Update pkgs/development/libraries/ncurses/default.nix Co-authored-by: Artturi ncurses: Explicitly use buildPackages for --with-build-cc stdenv.cc worked for me because my nixos was configured to use boot.binfmt.emulatedSystems. --- pkgs/development/libraries/ncurses/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index cb8333704ff12..9c1c8b422a98a 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -2,6 +2,7 @@ , stdenv , fetchurl , buildPackages +, ncurses , pkg-config , abiVersion ? "6" , enableStatic ? stdenv.hostPlatform.isStatic @@ -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;