Skip to content
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 with Nix Shell: clarification regarding easy-purescript-nix example #13

Open
sbellem opened this issue Oct 6, 2020 · 2 comments

Comments

@sbellem
Copy link

sbellem commented Oct 6, 2020

Hi,

thanks for this guide. As someone who is totally new to the "nixverse" I was a bit puzzled by the following very simple example, under https://github.com/justinwoo/nix-shorts/blob/master/posts/working-with-nix-shells.md#expressions-as-arguments:

But instead of only top level attributes, you can also put entire expressions in the -p argument. For example, with the easy-purescript-nix project:

$ nix-shell \
    -p 'let ep = import ./default.nix {}; in [ ep.purs ep.spago ]' \
   --run 'which purs; which spago; purs --version; spago version'
/nix/store/some-hash-purescript/bin/purs
/nix/store/some-hash-spago/bin/spago
0.13.3
0.9.0.0

So, if I understood correctly the command has to be run under a clone of the easy-purescript-nix repository. Perhaps adding the necessary git clone ... && cd ... instruction would be helpful.

I can make a small pull request for this if it makes sense.

Thanks!

@justinwoo
Copy link
Owner

Ah yeah, this really could use a better example that's contained to this repo with an example directory or something.

@justinwoo
Copy link
Owner

Changed the content to use an example just using nixpkgs: 97fd251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants