treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
This commit is contained in:
@@ -137,14 +137,14 @@ let
|
||||
revert = true;
|
||||
hash = "sha256-Lp5fGlcfJJ6p6vKmcLckJiAA2AZz4prjFE0aMEJxotw=";
|
||||
})
|
||||
] ++ lib.optionals (x11Support && stdenv.isDarwin) [
|
||||
] ++ lib.optionals (x11Support && stdenv.hostPlatform.isDarwin) [
|
||||
./use-correct-tcl-tk-on-darwin.patch
|
||||
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Fix darwin build https://bugs.python.org/issue34027
|
||||
../3.7/darwin-libutil.patch
|
||||
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
|
||||
# Disable the use of ldconfig in ctypes.util.find_library (since
|
||||
# ldconfig doesn't work on NixOS), and don't use
|
||||
@@ -188,7 +188,7 @@ let
|
||||
for i in Lib/plat-*/regen; do
|
||||
substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/
|
||||
done
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
|
||||
substituteInPlace Lib/multiprocessing/__init__.py \
|
||||
--replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")'
|
||||
@@ -205,7 +205,7 @@ let
|
||||
"--enable-unicode=ucs${toString ucsEncoding}"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isCygwin [
|
||||
"ac_cv_func_bind_textdomain_codeset=yes"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"--disable-toolbox-glue"
|
||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"PYTHON_FOR_BUILD=${lib.getBin buildPackages.python}/bin/python"
|
||||
@@ -240,7 +240,7 @@ let
|
||||
lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
|
||||
[ bzip2 openssl zlib libffi expat db gdbm ncurses sqlite readline ]
|
||||
++ lib.optionals x11Support [ tcl tk libX11 ]
|
||||
++ lib.optional (stdenv.isDarwin && configd != null) configd;
|
||||
++ lib.optional (stdenv.hostPlatform.isDarwin && configd != null) configd;
|
||||
nativeBuildInputs =
|
||||
[ autoreconfHook ]
|
||||
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
@@ -264,7 +264,7 @@ in with passthru; stdenv.mkDerivation ({
|
||||
|
||||
inherit src patches buildInputs nativeBuildInputs preConfigure configureFlags;
|
||||
|
||||
LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
|
||||
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"
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
, enableNoSemanticInterposition ? true
|
||||
|
||||
# enabling LTO on 32bit arch causes downstream packages to fail when linking
|
||||
, enableLTO ? stdenv.isDarwin || (stdenv.is64bit && stdenv.isLinux)
|
||||
, enableLTO ? stdenv.hostPlatform.isDarwin || (stdenv.hostPlatform.is64bit && stdenv.hostPlatform.isLinux)
|
||||
|
||||
# enable asserts to ensure the build remains reproducible
|
||||
, reproducibleBuild ? false
|
||||
@@ -95,7 +95,7 @@ assert x11Support -> tcl != null
|
||||
|
||||
assert bluezSupport -> bluez != null;
|
||||
|
||||
assert lib.assertMsg (enableFramework -> stdenv.isDarwin)
|
||||
assert lib.assertMsg (enableFramework -> stdenv.hostPlatform.isDarwin)
|
||||
"Framework builds are only supported on Darwin.";
|
||||
|
||||
assert lib.assertMsg (reproducibleBuild -> stripBytecode)
|
||||
@@ -152,7 +152,7 @@ let
|
||||
|
||||
nativeBuildInputs = [
|
||||
nukeReferences
|
||||
] ++ optionals (!stdenv.isDarwin) [
|
||||
] ++ optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
autoconf-archive # needed for AX_CHECK_COMPILE_FLAG
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
@@ -181,7 +181,7 @@ let
|
||||
] ++ optionals stdenv.hostPlatform.isMinGW [
|
||||
windows.dlfcn
|
||||
windows.mingw_w64_pthreads
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
] ++ optionals stdenv.hostPlatform.isDarwin [
|
||||
configd
|
||||
] ++ optionals tzdataSupport [
|
||||
tzdata
|
||||
@@ -293,9 +293,9 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
||||
bash # only required for patchShebangs
|
||||
] ++ buildInputs;
|
||||
|
||||
prePatch = optionalString stdenv.isDarwin ''
|
||||
prePatch = optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace configure --replace-fail '`/usr/bin/arch`' '"i386"'
|
||||
'' + optionalString (pythonOlder "3.9" && stdenv.isDarwin && x11Support) ''
|
||||
'' + optionalString (pythonOlder "3.9" && stdenv.hostPlatform.isDarwin && x11Support) ''
|
||||
# Broken on >= 3.9; replaced with ./3.9/darwin-tcl-tk.patch
|
||||
substituteInPlace setup.py --replace-fail /Library/Frameworks /no-such-path
|
||||
'';
|
||||
@@ -307,7 +307,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
||||
# (since it will do a futile invocation of gcc (!) to find
|
||||
# libuuid, slowing down program startup a lot).
|
||||
noldconfigPatch
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.isFreeBSD) [
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isFreeBSD) [
|
||||
# Cross compilation only supports a limited number of "known good"
|
||||
# configurations. If you're reading this and it's been a long time
|
||||
# since this diff, consider submitting this patch upstream!
|
||||
@@ -327,7 +327,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
||||
./3.7/darwin-libutil.patch
|
||||
] ++ optionals (pythonAtLeast "3.11") [
|
||||
./3.11/darwin-libutil.patch
|
||||
] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.isDarwin) [
|
||||
] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.hostPlatform.isDarwin) [
|
||||
# Stop checking for TCL/TK in global macOS locations
|
||||
./3.9/darwin-tcl-tk.patch
|
||||
] ++ optionals (hasDistutilsCxxPatch && pythonOlder "3.12") [
|
||||
@@ -384,7 +384,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
||||
env = {
|
||||
CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs);
|
||||
LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs);
|
||||
LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"}";
|
||||
LIBS = "${optionalString (!stdenv.hostPlatform.isDarwin) "-lcrypt"}";
|
||||
NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) ({
|
||||
"glibc" = "-lgcc_s";
|
||||
"musl" = "-lgcc_eh";
|
||||
@@ -414,7 +414,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
||||
(enableFeature enableGIL "gil")
|
||||
] ++ optionals enableOptimizations [
|
||||
"--enable-optimizations"
|
||||
] ++ optionals (stdenv.isDarwin && configd == null) [
|
||||
] ++ optionals (stdenv.hostPlatform.isDarwin && configd == null) [
|
||||
# Make conditional on Darwin for now to avoid causing Linux rebuilds.
|
||||
"py_cv_module__scproxy=n/a"
|
||||
] ++ optionals (sqlite != null) [
|
||||
@@ -467,16 +467,16 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
||||
for path in /usr /sw /opt /pkg; do
|
||||
substituteInPlace ./setup.py --replace-warn $path /no-such-path
|
||||
done
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
'' + optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Override the auto-detection in setup.py, which assumes a universal build
|
||||
export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.isAarch64 then "uint128" else "x64"}
|
||||
export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.hostPlatform.isAarch64 then "uint128" else "x64"}
|
||||
# Ensure that modern platform features are enabled on Darwin in spite of having no version suffix.
|
||||
sed -E -i -e 's|Darwin/\[12\]\[0-9\]\.\*|Darwin/*|' configure
|
||||
'' + optionalString (pythonAtLeast "3.11") ''
|
||||
# Also override the auto-detection in `configure`.
|
||||
substituteInPlace configure \
|
||||
--replace-fail 'libmpdec_machine=universal' 'libmpdec_machine=${if stdenv.isAarch64 then "uint128" else "x64"}'
|
||||
'' + optionalString (stdenv.isDarwin && x11Support && pythonAtLeast "3.11") ''
|
||||
--replace-fail 'libmpdec_machine=universal' 'libmpdec_machine=${if stdenv.hostPlatform.isAarch64 then "uint128" else "x64"}'
|
||||
'' + optionalString (stdenv.hostPlatform.isDarwin && x11Support && pythonAtLeast "3.11") ''
|
||||
export TCLTK_LIBS="-L${tcl}/lib -L${tk}/lib -l${tcl.libPrefix} -l${tk.libPrefix}"
|
||||
export TCLTK_CFLAGS="-I${tcl}/include -I${tk}/include"
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
|
||||
@@ -139,7 +139,7 @@ in {
|
||||
|
||||
hash = "sha256-3WHYjaJ0ws4s7HdmfUo9+aZSvMUOJvkJkdTdCvZrzPQ=";
|
||||
pythonVersion = "2.7";
|
||||
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
||||
db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
|
||||
python = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
|
||||
inherit passthruFun;
|
||||
inherit (darwin) libunwind;
|
||||
@@ -156,7 +156,7 @@ in {
|
||||
|
||||
hash = "sha256-56IEbH5sJfw4aru1Ey6Sp8wkkeOTVpmpRstdy7NCwqo=";
|
||||
pythonVersion = "3.9";
|
||||
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
||||
db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
|
||||
python = __splicedPackages.pypy27;
|
||||
inherit passthruFun;
|
||||
inherit (darwin) libunwind;
|
||||
|
||||
@@ -307,7 +307,7 @@ let
|
||||
|
||||
inherit strictDeps;
|
||||
|
||||
LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
|
||||
LANG = "${if python.stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8";
|
||||
|
||||
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||
doCheck = false;
|
||||
|
||||
@@ -63,7 +63,7 @@ in with passthru; stdenv.mkDerivation rec {
|
||||
zlib
|
||||
] ++ lib.optionals (lib.any (l: l == optimizationLevel) [ "0" "1" "2" "3"]) [
|
||||
boehmgc
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libunwind Security
|
||||
];
|
||||
|
||||
@@ -132,9 +132,9 @@ in with passthru; stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = lib.optionalString (stdenv.isDarwin) ''
|
||||
preFixup = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
|
||||
install_name_tool -change @rpath/lib${executable}-c.dylib $out/lib/lib${executable}-c.dylib $out/bin/${executable}
|
||||
'' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
||||
'' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
|
||||
mkdir -p $out/${executable}-c/pypy/bin
|
||||
mv $out/bin/${executable} $out/${executable}-c/pypy/bin/${executable}
|
||||
ln -s $out/${executable}-c/pypy/bin/${executable} $out/bin/${executable}
|
||||
|
||||
@@ -71,15 +71,15 @@ in with passthru; stdenv.mkDerivation {
|
||||
sqlite
|
||||
zlib
|
||||
stdenv.cc.cc.libgcc or null
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
tcl-8_5
|
||||
tk-8_5
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
tcl-8_6
|
||||
tk-8_6
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@@ -88,7 +88,7 @@ in with passthru; stdenv.mkDerivation {
|
||||
echo "Moving files to $out"
|
||||
mv -t $out bin include lib
|
||||
mv $out/bin/libpypy*-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
|
||||
${lib.optionalString stdenv.isLinux ''
|
||||
${lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
rm $out/bin/*.debug
|
||||
''}
|
||||
|
||||
@@ -101,12 +101,12 @@ in with passthru; stdenv.mkDerivation {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = lib.optionalString stdenv.isLinux ''
|
||||
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
find $out/{lib,lib_pypy*} -name "*.so" \
|
||||
-exec patchelf \
|
||||
--replace-needed libtinfow.so.6 libncursesw.so.6 \
|
||||
--replace-needed libgdbm.so.4 libgdbm_compat.so.4 {} \;
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
install_name_tool \
|
||||
-change \
|
||||
@rpath/lib${libPrefix}-c.dylib \
|
||||
@@ -119,12 +119,12 @@ in with passthru; stdenv.mkDerivation {
|
||||
$out/bin/${libPrefix}
|
||||
install_name_tool \
|
||||
-change \
|
||||
/opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \
|
||||
/opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \
|
||||
${tcl-8_6}/lib/libtcl8.6.dylib \
|
||||
$out/lib/${libPrefix}/_tkinter/*.so
|
||||
install_name_tool \
|
||||
-change \
|
||||
/opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \
|
||||
/opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \
|
||||
${tk-8_6}/lib/libtk8.6.dylib \
|
||||
$out/lib/${libPrefix}/_tkinter/*.so
|
||||
'';
|
||||
|
||||
@@ -71,15 +71,15 @@ in with passthru; stdenv.mkDerivation {
|
||||
sqlite
|
||||
zlib
|
||||
stdenv.cc.cc.libgcc or null
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
tcl-8_5
|
||||
tk-8_5
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
tcl-8_6
|
||||
tk-8_6
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@@ -88,7 +88,7 @@ in with passthru; stdenv.mkDerivation {
|
||||
echo "Moving files to $out"
|
||||
mv -t $out bin include lib-python lib_pypy site-packages
|
||||
mv $out/bin/libpypy*-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
|
||||
${lib.optionalString stdenv.isLinux ''
|
||||
${lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
mv lib/libffi.so.6* $out/lib/
|
||||
rm $out/bin/*.debug
|
||||
''}
|
||||
@@ -102,12 +102,12 @@ in with passthru; stdenv.mkDerivation {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = lib.optionalString (stdenv.isLinux) ''
|
||||
preFixup = lib.optionalString (stdenv.hostPlatform.isLinux) ''
|
||||
find $out/{lib,lib_pypy*} -name "*.so" \
|
||||
-exec patchelf \
|
||||
--replace-needed libtinfow.so.6 libncursesw.so.6 \
|
||||
--replace-needed libgdbm.so.4 libgdbm_compat.so.4 {} \;
|
||||
'' + lib.optionalString (stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (stdenv.hostPlatform.isDarwin) ''
|
||||
install_name_tool \
|
||||
-change \
|
||||
@rpath/lib${executable}-c.dylib \
|
||||
@@ -115,12 +115,12 @@ in with passthru; stdenv.mkDerivation {
|
||||
$out/bin/${executable}
|
||||
install_name_tool \
|
||||
-change \
|
||||
/opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \
|
||||
/opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \
|
||||
${tcl-8_6}/lib/libtcl8.6.dylib \
|
||||
$out/lib_pypy/_tkinter/*.so
|
||||
install_name_tool \
|
||||
-change \
|
||||
/opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \
|
||||
/opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \
|
||||
${tk-8_6}/lib/libtk8.6.dylib \
|
||||
$out/lib_pypy/_tkinter/*.so
|
||||
'';
|
||||
|
||||
@@ -204,7 +204,7 @@ let
|
||||
|
||||
inherit strictDeps;
|
||||
|
||||
LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
|
||||
LANG = "${if python.stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8";
|
||||
|
||||
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||
doCheck = false;
|
||||
|
||||
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# freeze the stdlib into the rustpython binary
|
||||
cargoBuildFlags = [ "--features=freeze-stdlib" ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration ];
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration ];
|
||||
|
||||
nativeCheckInputs = [ python3 ];
|
||||
|
||||
@@ -41,6 +41,6 @@ rustPlatform.buildRustPackage rec {
|
||||
# "_utimensat", referenced from:
|
||||
# rustpython_vm::function::builtin::IntoPyNativeFn::into_func::... in
|
||||
# rustpython-10386d81555652a7.rustpython_vm-f0b5bedfcf056d0b.rustpython_vm.7926b68e665728ca-cgu.08.rcgu.o.rcgu.o
|
||||
broken = stdenv.isDarwin && stdenv.isx86_64;
|
||||
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ let
|
||||
is_nixenv = "False";
|
||||
is_virtualenv = "False";
|
||||
};
|
||||
} // lib.optionalAttrs (!python.isPyPy && !stdenv.isDarwin) {
|
||||
} // lib.optionalAttrs (!python.isPyPy && !stdenv.hostPlatform.isDarwin) {
|
||||
# Use virtualenv from a Nix env.
|
||||
# Fails on darwin with
|
||||
# virtualenv: error: argument dest: the destination . is not write-able at /nix/store
|
||||
@@ -106,7 +106,7 @@ let
|
||||
# Integration tests involving the package set.
|
||||
# All PyPy package builds are broken at the moment
|
||||
integrationTests = lib.optionalAttrs (!python.isPyPy) (
|
||||
lib.optionalAttrs (python.isPy3k && !stdenv.isDarwin) { # darwin has no split-debug
|
||||
lib.optionalAttrs (python.isPy3k && !stdenv.hostPlatform.isDarwin) { # darwin has no split-debug
|
||||
cpython-gdb = callPackage ./tests/test_cpython_gdb {
|
||||
interpreter = python;
|
||||
};
|
||||
@@ -222,7 +222,7 @@ let
|
||||
}
|
||||
) {};
|
||||
pythonWithRequests = requests.pythonModule.withPackages (ps: [ requests ]);
|
||||
in lib.optionalAttrs (python.isPy3k && stdenv.isLinux)
|
||||
in lib.optionalAttrs (python.isPy3k && stdenv.hostPlatform.isLinux)
|
||||
{
|
||||
condaExamplePackage = runCommand "import-requests" {} ''
|
||||
${pythonWithRequests.interpreter} -c "import requests" > $out
|
||||
|
||||
Reference in New Issue
Block a user