autoPatchelfHook: expose script as top level package#340162
autoPatchelfHook: expose script as top level package#340162layus merged 1 commit intoNixOS:stagingfrom
Conversation
|
CC @aszlig, who initially wrote autoPatchelfHook and |
e46ac0a to
e518187
Compare
|
I'd want someone with a darwin machine to review this and make sure this doesn't break anything on their end @NixOS/darwin-maintainers |
|
Result of |
|
Can you try building some random packages that require |
|
That's odd that it doesn't rebuild anything, borgo claims >11 darwin rebuilds 🤔 |
|
Trying to build codeium right now -- had a hard time finding packages that used autoPatchelfHook and were supported on darwin. |
|
Also, I'm not sure that nixpkgs-review terminated cleanly. Left it running while I did other things and came back to what seemed to be an error when building |
|
I'm also running nixpkgs-review on Darwin. The M3 is humming along nicely while the poor i7 x86 is wheezing and limping |
|
Result of 729 packages marked as broken and skipped:
7 packages failed to build:
|
|
That's a likely incomplete result. |
|
Result of 729 packages marked as broken and skipped:
7 packages failed to build:
|
|
Among those 7 failures, are they broken on the base branch? (staging) |
|
Result of 729 packages marked as broken and skipped:
6 packages failed to build:
|
I'm running the tests on master. Also, building continues past those seven failures; the errors seem to have broken the review tool. |
|
From the aarch64-Darwin review: error: builder for '/nix/store/m6x5zc5i224ind4r0ls17dxxrh7w7y7f-tzdata-2024b.drv' failed with exit code 2;
last 10 log lines:
> ./zdump -i -c 2050 "$PWD/tzs2050.dir/Pacific/Palau" >tzs2050.dir/Pacific/Palau.zd
> ./zdump -i -c 2050 "$PWD/tzs2050.dir/Pacific/Pitcairn" >tzs2050.dir/Pacific/Pitcairn.zd
> ./zdump -i -c 2050 "$PWD/tzs2050.dir/Pacific/Port_Moresby" >tzs2050.dir/Pacific/Port_Moresby.zd
> ./zdump -i -c 2050 "$PWD/tzs2050.dir/Pacific/Rarotonga" >tzs2050.dir/Pacific/Rarotonga.zd
> ./zdump -i -c 2050 "$PWD/tzs2050.dir/Pacific/Tahiti" >tzs2050.dir/Pacific/Tahiti.zd
> ./zdump -i -c 2050 "$PWD/tzs2050.dir/Pacific/Tarawa" >tzs2050.dir/Pacific/Tarawa.zd
> ./zdump -i -c 2050 "$PWD/tzs2050.dir/Pacific/Tongatapu" >tzs2050.dir/Pacific/Tongatapu.zd
> make[1]: Leaving directory '/private/tmp/nix-build-tzdata-2024b.drv-0'
> rm -fr tzs2050.dir
> mv to2050new.tzs.out to2050new.tzs
For full logs, run 'nix log /nix/store/m6x5zc5i224ind4r0ls17dxxrh7w7y7f-tzdata-2024b.drv'.
error: 1 dependencies of derivation '/nix/store/r574j91mjhf86wid804d6n3cqx1djrgb-python3-3.12.5.drv' failed to build
building '/nix/store/aqq9ipnrqim5qnfiim6dqxn72vximyqf-autoreconf-hook.drv'...
error: 1 dependencies of derivation '/nix/store/3d5m1qk6jc6wkkb1cz62lak86rdmlkss-clang-16.0.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gfbfvid3shiibyi2fg6hp9cvnzk96c1x-clang-16.0.6.drv' failed to build
error (ignored): error: cannot unlink '/private/tmp/nix-build-cmake-minimal-3.29.6.drv-0/cmake-3.29.6/Tests/RunCMake/Cpplint': Directory not empty
error (ignored): error: cannot unlink '/private/tmp/nix-build-gnum4-1.4.19.drv-0/m4-1.4.19': Directory not empty
building '/nix/store/vyl060wkn7jclyyg3xr36n8671jmb8pw-die-hook.drv'...
building '/nix/store/aismd906v0man4lnngm2gk8yksirq73y-e2fsprogs-1.47.1.drv'...
building '/nix/store/a3ldz26dj8p7fadm0ggxhdk3yw9nz0gw-expand-response-params.drv'...
building '/nix/store/4i8and5yc22b4xgh4750vwjji8z3jvir-gnu-config-2024-01-01.drv'...
error: 1 dependencies of derivation '/nix/store/79lvvnhczswxxhjz0l54hy6b70yzmv6s-llvm-16.0.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/813f19l6i9jgd1fsd76hhx094q1bdf70-meson-1.5.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9y30lci7c6jp933z5g2v5vv89v41ccla-python3-3.12.5-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/lagps4k9zkm6y67lasa9fzrkd2kyv44m-python3.12-recommonmark-0.7.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/73jhx2bdvslq94qqsn9igc8rqvl5z7yg-python3.12-sphinx-7.3.7.drv' failed to build
building '/nix/store/bja0qmqp676bibh7yyplibwpmpwfmi4q-readline-8.2p13.drv'...
error: 1 dependencies of derivation '/nix/store/w7jlvgzd1cdqs9cbfip17qq348rs7dz7-bootstrap-stage3-clang-wrapper-16.0.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g7ims7qlknxs4a3phqz3i8mw7w2q78cf-bootstrap-stage4-clang-wrapper-16.0.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/20w459f19lq1y4kdn1lmaa30jyrj1d5i-cctools-binutils-darwin-1010.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mbl4hpyq3m5d2jawj8a6rm5nsaq2w1rh-cctools-binutils-darwin-1010.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/01ynygdkngbdq86b88vndwdxsysl44ys-clang-wrapper-16.0.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4d3c80i9czmdrqhgxygqyxp83kr0r4h8-clang-wrapper-16.0.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pyjyvnsdm538inmh2arrkny9spiqzmwp-libiconv-99.drv' failed to build
error: 1 dependencies of derivation '/nix/store/s8kx3kqvhcqslzm3jcgn6g3i3shsw61q-libiconv-99.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c449ah7zrw8pqfzql228zpi78h2xpi1k-perl-5.38.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nzij7nh9ksvc56yswyfrpzppxc5dnic0-stdenv-darwin.drv' failed to build
error: build of '/nix/store/0rrcrrbmpfg1g747v6dbww12172v7ff3-bash-5.2p32.drv', '/nix/store/7v76719hjb8vlwwhxslwvlrfrci5a0c0-bash-interactive-5.2p32.drv', '/nix/store/nzij7nh9ksvc56yswyfrpzppxc5dnic0-stdenv-darwin.drv' failed |
Same thing I ran into |
Signed-off-by: Sefa Eyeoglu <[email protected]>
e518187 to
567bd7c
Compare
|
@sarahec can you upload the build log for tzdata as a gist and link it here? |
For what it's worth, this is from aarch64-Darwin |
|
Weird. I don't see anything that jumps out at me as possibly causing the failure. It doesn't even seem to depend on autopatchelfHook? |
|
Please note that the merge base is |
|
This is really interesting. It makes sense for this script to become more and more independent. Things that bug me:
Right now, I think it makes sense to merge into staging. I will take it on me to see if it breaks anything there. |
|
This change started leaking the current python interpreter into every build that consumes it. That broke the python version detection in e.g. the |
|
Proposed a fix in #353270 |
NixOS#340162 introduced `autoPatchelfHook` as it's own top-level attribute. This also made it use the Nixpkgs Python build infrastructure, which relies on dependency propagation, leaking Python as a dependency into many builds erroneously. This change uses a `withPackages` constructed environment instead, and manually patches the script shebangs, not triggering the `buildPython*` dependency propagation mechanism
Description of changes
This allows PRs like #337340 to make use of auto-patchelf in downstream applications.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.