-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
buildEnv: allow custom environment variables to be set #20822
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
Conversation
The commit is authored by 'Test'. Is that intentional? :) |
@danbst Whoops, not sure how that happened... |
1fb7726
to
c82cfe4
Compare
@edolstra This has been sitting here for a while, any chance it could get merged? |
/cc @Mic92 bump? |
One thing to note is that you can do away with |
@GrahamcOfBorg eval |
@Mic92 do you wish to keep this open? |
Thank you for your contributions.
|
I don't think this is useful, since you can do what you want by just doing I'm in favor of closing this. |
In addition to @L-as, for consistency we'd have to allow this everywhere, which is not feasible and not necessary. |
Motivation for this change
buildEnv
allows for apostBuild
step, but doesn't provide a mechanism for setting environment variables during that step besides inlining them into the bash string (which could have problems e.g. with special characters). This adds anenvironment
parameter which allows environment variables to be set.Things done
Not really anything to test here; none of the existing libraries use this. I've build
env
s of my own using this parameter, and it works.(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)