For a context:
this issue python3.withPackages: python wrapper doesn't load generated env on x86_64-linux (emulated on darwin with rosetta) · Issue #461884 · NixOS/nixpkgs · GitHub is killer of Python envs and affects current master and current nixpkgs-unstable (checked out today).
its scope is broader and Darwin is also affected.
Apart from wondering why it’s not back ported (and assuming there are valid reasons for this),
building the patch is quite painful experience as it wants to bootstrap stdenv:
--- a/pkgs/development/interpreters/python/wrapper.nix 2025-11-28 10:03:04
+++ b/pkgs/development/interpreters/python/wrapper.nix 2025-11-25 16:15:55
@@ -50,6 +50,7 @@
if [ "$prg" = "${python.executable}" ]; then
makeWrapper "${python.interpreter}" "$out/bin/$prg" \
--inherit-argv0 \
+ --resolve-argv0 \
${lib.optionalString (!permitUserSite) ''--set PYTHONNOUSERSITE "true"''} \
${lib.concatStringsSep " " makeWrapperArgs}
elif [ "$(readlink "$prg")" = "${python.executable}" ]; then
So, by a chance, maybe has someone already built patched nixpkgs-unstable and cached it for aarch64-darwin?