python2: fix paths for structuredAttrs
Without this, things like zlib are not found.
This commit is contained in:
@@ -296,7 +296,7 @@ let
|
||||
|
||||
# Python 2.7 needs this
|
||||
crossCompileEnv = lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
||||
_PYTHON_HOST_PLATFORM = stdenv.hostPlatform.config;
|
||||
env._PYTHON_HOST_PLATFORM = stdenv.hostPlatform.config;
|
||||
};
|
||||
|
||||
# Build the basic Python interpreter without modules that have
|
||||
@@ -318,14 +318,15 @@ stdenv.mkDerivation (
|
||||
configureFlags
|
||||
;
|
||||
|
||||
LDFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-lgcc_s";
|
||||
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
|
||||
|
||||
env.NIX_CFLAGS_COMPILE =
|
||||
lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2"
|
||||
+ lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"
|
||||
+ " -std=gnu17";
|
||||
DETERMINISTIC_BUILD = 1;
|
||||
env = {
|
||||
LDFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-lgcc_s";
|
||||
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
|
||||
NIX_CFLAGS_COMPILE =
|
||||
lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2"
|
||||
+ lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"
|
||||
+ " -std=gnu17";
|
||||
DETERMINISTIC_BUILD = 1;
|
||||
};
|
||||
|
||||
setupHook = python-setup-hook sitePackages;
|
||||
|
||||
@@ -398,6 +399,8 @@ stdenv.mkDerivation (
|
||||
|
||||
doCheck = false; # expensive, and fails
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://python.org";
|
||||
description = "High-level dynamically-typed programming language";
|
||||
|
||||
Reference in New Issue
Block a user