diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index a934d6c3bcf2..98e5b4b1da0e 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -176,7 +176,8 @@ in stdenv.mkDerivation { LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; - NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2"; + NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2" + + optionalString hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; DETERMINISTIC_BUILD = 1; setupHook = python-setup-hook sitePackages; diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix index d4391d873af7..797a5be40ff3 100644 --- a/pkgs/development/interpreters/python/cpython/3.4/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix @@ -105,6 +105,9 @@ in stdenv.mkDerivation { ${optionalString stdenv.isDarwin '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2" export MACOSX_DEPLOYMENT_TARGET=10.6 + '' + + optionalString stdenv.hostPlatform.isMusl '' + export NIX_CFLAGS_COMPILE+=" -DTHREAD_STACK_SIZE=0x100000" ''} ''; diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix index 4f9e79c1d5f0..6dbf9a09cf56 100644 --- a/pkgs/development/interpreters/python/cpython/3.5/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix @@ -99,6 +99,9 @@ in stdenv.mkDerivation { ${optionalString stdenv.isDarwin '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2" export MACOSX_DEPLOYMENT_TARGET=10.6 + '' + + optionalString stdenv.hostPlatform.isMusl '' + export NIX_CFLAGS_COMPILE+=" -DTHREAD_STACK_SIZE=0x100000" ''} ''; diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index 317a335b3448..63a70b7496db 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -122,6 +122,9 @@ in stdenv.mkDerivation { ${optionalString stdenv.isDarwin '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2" export MACOSX_DEPLOYMENT_TARGET=10.6 + '' + + optionalString stdenv.hostPlatform.isMusl '' + export NIX_CFLAGS_COMPILE+=" -DTHREAD_STACK_SIZE=0x100000" ''} '';