New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotty: wrap to prevent installing all the files in profile #33330
dotty: wrap to prevent installing all the files in profile #33330
Conversation
3af6c0d
to
c130008
Compare
3a43972
to
314896d
Compare
@GrahamcOfBorg build dotty |
Pinging @yegortimoshenko, hello :) You've helped me with the last PR of dotty suggesting wrapping the derivation to prevent the leaking of /bin, would you mind reviewing this PR? Thanks! |
@GrahamcOfBorg build dotty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: aarch64-linux
error: while evaluating the attribute 'installPhase' of the derivation 'dotty-0.4.0-RC1' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:134:11:
while evaluating the attribute 'fixupPhase' of the derivation 'dotty-bare-0.4.0-RC1' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:134:11:
while evaluating the attribute 'buildInputs' of the derivation 'openjdk-8u152b16' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:134:11:
while evaluating the attribute 'buildCommand' of the derivation 'openjdk-bootstrap' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:134:11:
No bootstrap for system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: x86_64-darwin
0:00
:01 --:--:-- 9827
k
building path(s) ‘/nix/store/sfxlq7ncb8ffw6crs36a2559mrdwf84x-dotty-bare-0.4.0-RC1’
/nix/store/zsn4rc9p48hsq6a53357fmk314b0ahg4-stdenv-darwin/setup: fork: Operation not permitted
/nix/store/zsn4rc9p48hsq6a53357fmk314b0ahg4-stdenv-darwin/setup: fork: Operation not permitted
builder for ‘/nix/store/cr88l5w48z0fwgnx2h1izzk9xdp9a5yp-dotty-bare-0.4.0-RC1.drv’ failed with exit code 254
cannot build derivation ‘/nix/store/mzkz2p68i1vfvl3xy9szid46164bifqf-dotty-0.4.0-RC1.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/mzkz2p68i1vfvl3xy9szid46164bifqf-dotty-0.4.0-RC1.drv’ failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-linux
building
no Makefile, doing nothing
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/mgvn2hhz532c1l9jscxgjl4hc0d72cff-dotty-0.4.0-RC1
strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/mgvn2hhz532c1l9jscxgjl4hc0d72cff-dotty-0.4.0-RC1/bin
patching script interpreter paths in /nix/store/mgvn2hhz532c1l9jscxgjl4hc0d72cff-dotty-0.4.0-RC1
checking for references to /tmp/nix-build-dotty-0.4.0-RC1.drv-0 in /nix/store/mgvn2hhz532c1l9jscxgjl4hc0d72cff-dotty-0.4.0-RC1...
/nix/store/mgvn2hhz532c1l9jscxgjl4hc0d72cff-dotty-0.4.0-RC1
@grahamc: x86_64-darwin is having some issues... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than minor syntactical nitpicks, this is great!
url = "https://github.com/lampepfl/dotty/releases/download/${version}/${name}.tar.gz"; | ||
sha256 = "1d1ab08b85bd6898ce6273fa50818de0d314fc6e5377fb6ee05494827043321b"; | ||
let | ||
self = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This self
only has one attribute and thus could be omitted:
let
dotty-bare = callPackage ./dotty-bare.nix {
inherit stdenv fetchurl makeWrapper jre;
};
in
''; | ||
|
||
fixupPhase = '' | ||
for p in $out/bin/* ; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If $out/bin/*
here were to be replaced with $(find $out/bin -type f ! -name common)
, conditions below would not be required.
license = licenses.bsd3; | ||
platforms = platforms.all; | ||
maintainers = [maintainers.karolchmist]; | ||
meta = with dotty-bare.meta; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inherit (dotty-bare) meta;
314896d
to
d72c209
Compare
d72c209
to
6c6f620
Compare
Thanks @yegortimoshenko , I've modified the code as you suggested. |
Motivation for this change
Fixes #31858
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)