-
Notifications
You must be signed in to change notification settings - Fork 841
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
Environment variable equivalent for --nix
#3980
Comments
You can also put this into nix:
enable: true |
That's what I'd like to avoid.
…On 3 May 2018 14:05:44 GMT+10:00, Chris Martin ***@***.***> wrote:
You can also put this into `~/.stack/config.yaml`:
```yaml
nix:
enable: true
```
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#3980 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
This is now available inside Nix 2.0. Stack just needs to check this variable:
|
That's set when you're inside Alternatively, it could check whether |
I thought this PR #3938 would bring in automatic nix integration without the explicit Actually I checked the commit: a88aa5a It indicates that the commit did make it into 1.7.1, so how come I still need {
pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/be1461fc0ab29c45c69e7b2c2097c887750e4fe0.tar.gz) {}
}:
with pkgs;
haskell.lib.buildStackProject {
name = "stack-test";
} Then run
Then |
What are the contents of your |
I'm not currently using stack anymore because Nix + Cabal is sufficient for now. |
Understood closing |
Just a feature suggestion.
I know there's the
--nix
flag and thenix
setting on thestack.yaml
. However I'd prefer there to be a sort of environment variable to utilise instead. Something likeSTACK_USE_NIX=1
.The reason is that I don't want to force nix onto non-nix users by setting it on the
stack.yaml
and using an alias doesn't get inherited by shell scripts:alias stack='\stack --nix'
.The text was updated successfully, but these errors were encountered: