From 6c77e93a06047a0fae4abe009e821080dfb6ee4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 1 Sep 2025 15:57:18 +0200 Subject: [PATCH] pypy: put NIX_CFLAGS_COMPILE under env to fix withCFlags --- .../interpreters/python/pypy/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 7779b3fbba8f..fa97386d68ce 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -120,14 +120,16 @@ stdenv.mkDerivation rec { dontPatchShebangs = true; disallowedReferences = [ python ]; - # fix compiler error in curses cffi module, where char* != const char* - NIX_CFLAGS_COMPILE = - if stdenv.cc.isClang then "-Wno-error=incompatible-function-pointer-types" else null; - C_INCLUDE_PATH = lib.makeSearchPathOutput "dev" "include" buildInputs; - LIBRARY_PATH = lib.makeLibraryPath buildInputs; - LD_LIBRARY_PATH = lib.makeLibraryPath ( - builtins.filter (x: x.outPath != stdenv.cc.libc.outPath or "") buildInputs - ); + env = { + # fix compiler error in curses cffi module, where char* != const char* + NIX_CFLAGS_COMPILE = + if stdenv.cc.isClang then "-Wno-error=incompatible-function-pointer-types" else null; + C_INCLUDE_PATH = lib.makeSearchPathOutput "dev" "include" buildInputs; + LIBRARY_PATH = lib.makeLibraryPath buildInputs; + LD_LIBRARY_PATH = lib.makeLibraryPath ( + builtins.filter (x: x.outPath != stdenv.cc.libc.outPath or "") buildInputs + ); + }; patches = [ ./dont_fetch_vendored_deps.patch