nix-shorts
nix-shorts copied to clipboard
Working with Nix Shell: clarification regarding easy-purescript-nix example
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!