From 2f027dff0b5fcd646cd8c96bc2f473f0cd8f0993 Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Thu, 17 Mar 2022 00:19:30 +0100 Subject: [PATCH] python: remove ncurses flag It seems the additional linker flags were added in 9d3b0a2 (May 2008) as a workaround for readline support. They were kept since then, but it also means that `python3-config` outputs these flags ```console $ python3-config --libs -lpthread -ldl -lcrypt -lncurses -lutil -lm -lm ``` while other GNU/Linux distros do not. For example, Debian 11: ```console $ sudo apt install python3-dev $ python3-config --libs -lcrypt -lpthread -ldl -lutil -lm -lm ``` This change removes the `-lncurses` flag and aligns Nix/NixOS with other distros. --- pkgs/development/interpreters/python/cpython/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 02ecf8d25b1e..4dc95d9e1fd7 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -282,7 +282,7 @@ in with passthru; stdenv.mkDerivation { CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs); LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs); - LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"; + LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"}"; NIX_LDFLAGS = lib.optionalString stdenv.cc.isGNU ({ "glibc" = "-lgcc_s"; "musl" = "-lgcc_eh";