Closed ryantm closed 4 years ago
What's the purpose behind the -p flag? That should already get loaded from shell.nix, and I'd like to keep it centralised if possible
On Sun, 26 Jan 2020, 17:00 Ryan Mulligan, notifications@github.com wrote:
I am now using this in nixpkgs-update production, yay!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Synthetica9/nixpkgs-update-github-releases/pull/6?email_source=notifications&email_token=ABV7PJYO2WPAPA7IOX4XZXLQ7WXSBA5CNFSM4KLT6X22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5XGNA#issuecomment-578515764, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV7PJ2ZF2NVWTP4Q63JL73Q7WXSBANCNFSM4KLT6X2Q .
It might be because I'm ignorant of how to use the default.nix here. How would you do an "import from derivation" on this repo? By using the -p in the shebang, I didn't need to use shell.nix or default.nix at all, however, this means it was building the dependencies at runtime, so probably figuring out the import from derivation way would be better.
For reference, here is how I'm using this https://github.com/nix-community/infra/blob/9f50926734dfb1079425a15ef4576e0859cbcad9/build01/nixpkgs-update.nix#L19
Oh, I see.
By default, nix-shell without arguments relies on loading shell.nix
from our working directory. However, paths are still treated absolutely, so we can say #!nix-shell -i python3 ./shell.nix
instead and have it work for any working directory. Does that work for you?
Closed via 222a5199778c38151a079989900a117853eea6b1 and 976854559e4ecde96c43de40dd90b7b5e5f9966a
I am now using this in nixpkgs-update production, yay!