-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Working build #4
Conversation
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.
Nice!
Maybe @kentonv can comment re: whether there's a better workaround for when /var/tmp
isn't available?
cp -r "$capnprotoSrc" deps/capnproto | ||
chmod u+w deps/capnproto/c++/src/kj -R | ||
sed -i 's/\/var\/tmp/\/tmp/g' deps/capnproto/c++/src/kj/filesystem-disk-test.c++ | ||
unset NIX_ENFORCE_PURITY |
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 this is going to be our solution, I think it could stand a comment explaining what the issues/with links to relevant docs.
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.
Well, I can link to that previous issue (and perhaps this one), but I really have no deep understanding of what is going on so far. I figured this out by noticing that builder.sh
fails under nix-shell
but succeeds if the line . "$stdenv/setup"
is commented out (#2). So I ran the following script under nix-shell
set > env-pre
. "$stdenv/setup"
set > env-post
... diffed the outputs, and then manually set the environment variables that were different. I bisected them (started by commenting out half of the lines) and after a few such rounds determined that NIX_ENFORCE_PURITY
alone is causing the issues. Interestingly, the linked issue is pretty much the first thing that comes up when searching the internet for that identifier. I had found that issue previously, but thought it must have been closed for good reason.
Also, while the current workaround is good enough to get ekam to build, I suspect that ekam is unlikely to be able to build anything else unless the user were to unset NIX_ENFORCE_PURITY
before invoking ekam in that build as well.
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.
Hmm, there are a handful of other expressions in nixpkgs that either unset NIX_ENFORCE_PURITY
or set it to the empty string. So maybe my solution is an acceptable one after all.
I find it curious that the capnproto nix expression does not require the same Also, should we really be keeping the |
I understand this a little bit better now. The only role of Here's the complete list of |
I'm not sure that it matters much, since this is only used for tests. We could, perhaps, have the tests write somewhere in the build directory tree, but I'm not sure this helps anything, as the whole build tree is (I believe) a chroot in |
I was wrong: it only happens if |
unset NIX_ENFORCE_PURITY
is, of course, reminiscent of NIX_ENFORCE_PURITY breaksekam
in hard to diagnose ways NixOS/nixpkgs#13532./var
(and thus no/var/tmp
) in the build environment. So I usedsed
to patch the capnproto sources in place.This is probably not the final solution, but it at least works!