Re: [Nix-dev] nix-shell pro/con (was: Python 3 as default)
Profpatsch writes: > On 17-02-15 09:10pm, Ricardo M. Correia wrote: >> With nix-shell, I risk having the packages I need become outdated (without >> me noticing) and/or become garbage collected (which I do every day >> automatically) and unavailable if I lose Internet access (e.g. because I'm >> traveling). > > I think you are confusing nix-env and nix-shell; nix-shell can’t have > “outdated” packages, it will use what you specify. > > packages being not cached is a largely orthogonal problem; > for example it would be quite easy to create a script that fetches > the nix-shell deps for all your projects and creates a folder with > gc-roots. The next version of cabal-install will perform this caching for you automatically. It uses your shell.nix (if present) and adds GC roots for the results. Your environment is not garbage collected or updated unless you clear out the work directory or modify the shell.nix. This is not relevant to the discussion of Python interpreters, but I thought it would be of general interest. Regards, Thomas ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nix-shell pro/con (was: Python 3 as default)
On Wednesday 15 February 2017 22:08:26 Profpatsch wrote: > On 17-02-15 09:10pm, Ricardo M. Correia wrote: > > Personally, I try to avoid using "nix-shell" as much as possible because I > > want "nixos-rebuild switch" to atomically install (and upgrade) all the > > software that I usually need, including development packages. > > > > With nix-shell, I risk having the packages I need become outdated (without > > me noticing) and/or become garbage collected (which I do every day > > automatically) and unavailable if I lose Internet access (e.g. because I'm > > traveling). > > packages being not cached is a largely orthogonal problem; > for example it would be quite easy to create a script that fetches > the nix-shell deps for all your projects and creates a folder with > gc-roots. I've written such a script a while ago: https://gist.github.com/aherrmann/51b56283f9ed5853747908fbab907316 It places the gcroots in separate folders under `~/.nix-shell`. If you run it as `pnix-shell -c` it will reevaluate the Nix expression. This way you can enforce updates. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nix-shell pro/con (was: Python 3 as default)
On 17-02-15 09:10pm, Ricardo M. Correia wrote: > Personally, I try to avoid using "nix-shell" as much as possible because I > want "nixos-rebuild switch" to atomically install (and upgrade) all the > software that I usually need, including development packages. > > With nix-shell, I risk having the packages I need become outdated (without > me noticing) and/or become garbage collected (which I do every day > automatically) and unavailable if I lose Internet access (e.g. because I'm > traveling). I think you are confusing nix-env and nix-shell; nix-shell can’t have “outdated” packages, it will use what you specify. packages being not cached is a largely orthogonal problem; for example it would be quite easy to create a script that fetches the nix-shell deps for all your projects and creates a folder with gc-roots. For long-running projects I use `git worktree` to have a stable checkout. If you want to get fancy you could set up a hydra if you want to follow e.g. stable with your own patches applied. -- Proudly written in Mutt with Vim on NixOS. Q: Why is this email five sentences or less? A: http://five.sentenc.es May take up to five days to read your message. If it’s urgent, call me. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev