The issue manifests itself as the following on `aarch64-darwin`:
```
>>> import ctypes
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/nix/store/i8cq0xrjirz1rcp65wzcyhj6ypzlw9il-python3-3.7.10/lib/python3.7/ctypes/__init__.py", line 551, in <module>
_reset_cache()
File "/nix/store/i8cq0xrjirz1rcp65wzcyhj6ypzlw9il-python3-3.7.10/lib/python3.7/ctypes/__init__.py", line 273, in _reset_cache
CFUNCTYPE(c_int)(lambda: None)
MemoryError
```
The commit we backport is included in Python 3.8, and it reverts
the change that was introduced all the way back in Python 2.7.
Now that `buildEnv` is ready, always put `makeWrapper` in
`nativeBuildInputs`, rather than `buildInputs` or (worse) mucking around
with setup hooks by hand.
(C.f. #112276, which didn't catch these because the manual setup hook
sourcing is such a hack to being with!)
Fixes#114687
Fixing the following error:
```
LD ../priv/x86_64-apple-darwin20.3.0/wxe_driver.so
ld: file not found: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
```
The package set is an attribute of the interpreter. The function to
build an environment (`buildEnv`/`withPackages`) is part of the
interpreter. The interpreter is passed to itself, and needs to be
updated when overridden.
For cross-compilation we splice the package set, and for that the
various `build/host` interpreters and sets need to be available. We
select these currently through `pkgs.${pythonAttr}`. The `pythonAttr`
attribute was not fixed for `pythonFull`.
https://github.com/NixOS/rfcs/pull/83https://github.com/NixOS/nixpkgs/pull/104201
We need a better solution for this because this is very brittle.
This was originally in #105026, but then 5.30.1 happened with
this change included, so there were conflict and the patch
got dropped. Let's introduce it separately for only one version
that still needs it.
This commit syncs the arguments passed to the babashka with upstream:
77daea7362/script/compile (L41-L74)
The idea here is to enable more features and reduce the number of issues
compared to upstream.
Also add some tests to ensure everything is working.