Re: [Nix-dev] nix-shell and persistent environment

2016-10-02 Thread Daniel Hlynskyi
> You do this for keep things in order or because it buys you functionality?

The former. Single shell expression generates many roots:

.nix-gc-roots/dev-shell.drv ->
/nix/store/ivznvsqn40vb6vkccy092ph1ryhlq12w-nixpkgs-patched
.nix-gc-roots/dev-shell.drv-10 ->
/nix/store/4zq1535pa85wkaxlxdrp751jhznlw8ki-stdenv
.nix-gc-roots/dev-shell.drv-11 ->
/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh
.nix-gc-roots/dev-shell.drv-2 ->
/nix/store/9mcsmyj6b2f6k8527yxbbgpj7ahr3w2b-rlwrap-0.42
.nix-gc-roots/dev-shell.drv-2-doc ->
/nix/store/9z2rfwf2pl07l5qf3p2d7b4hqw9gs5h4-bash-4.3-p46-doc
.nix-gc-roots/dev-shell.drv-2-info ->
/nix/store/vd4pq9lxpihd2m86k6hckq30ky5gj2xb-bash-4.3-p46-info
.nix-gc-roots/dev-shell.drv-3 ->
/nix/store/nyj6xd7s1n1w8c0xdwk5ddhi7bjcyi9x-bash-4.3-p46
.nix-gc-roots/dev-shell.drv-3-doc ->
/nix/store/9z2rfwf2pl07l5qf3p2d7b4hqw9gs5h4-bash-4.3-p46-doc
.nix-gc-roots/dev-shell.drv-3-info ->
/nix/store/vd4pq9lxpihd2m86k6hckq30ky5gj2xb-bash-4.3-p46-info
.nix-gc-roots/dev-shell.drv-4 ->
/nix/store/p9sfacfhf35f41nqkw6pa1i8hamn5dha-sshpass-1.05
.nix-gc-roots/dev-shell.drv-5 ->
/nix/store/4kmvzlc587bmx6lbfqy171pim5za36az-sqlite-3.14.1
.nix-gc-roots/dev-shell.drv-5-bin ->
/nix/store/b38jh5lwv42985vymzx3ayj4irz638r0-sqlite-3.14.1-bin
.nix-gc-roots/dev-shell.drv-5-dev ->
/nix/store/kiixbwijnfgb3y46l3avc0rhwl9iqida-sqlite-3.14.1-dev
.nix-gc-roots/dev-shell.drv-6 ->
/nix/store/nzzdhli6j2m7bbyj1a1cq2g99mz2cwvs-jq-1.5
.nix-gc-roots/dev-shell.drv-6-bin ->
/nix/store/b38jh5lwv42985vymzx3ayj4irz638r0-sqlite-3.14.1-bin
.nix-gc-roots/dev-shell.drv-6-dev ->
/nix/store/kiixbwijnfgb3y46l3avc0rhwl9iqida-sqlite-3.14.1-dev
.nix-gc-roots/dev-shell.drv-7 ->
/nix/store/577a01ii2g1z9qflgc8w8d85ajyfvwvp-nixops-tarball-1.5pre0_abcdef
.nix-gc-roots/dev-shell.drv-8 ->
/nix/store/akbbv847pfxbi31knwypvwi7nfwcbp9m-nixops-1.5pre0_abcdef
.nix-gc-roots/dev-shell.drv-9 ->
/nix/store/w67jiazdf4xyrgs5s0rj5rdxrf92zxil-nss-cacert-3.26

btw, now I see there are duplicate entities, so I guess it is useful to
clean roots before nix-shell run.


> This is basically my experience. The method on the old wiki makes the
> environment survive `nix-channel --update` but not `nix-collect-garbage`
> which is weird because (as in the wiki) I explicitly asked for the .drv
> be a '--indirect --add-root' on $PWD.

I hope there is a way to pin src as GC root, but dumb `buildInputs = [
nixpkgsSrc ];` doesn't work.

2016-10-01 15:49 GMT+00:00 Ruben Astudillo :

> On 01/10/16 04:03, Daniel Hlynskyi wrote:
> > To complete previous answer.
> >
> > I create a separate directory .nix-gc-roots, because nix-shell produces
> > many roots.
>
> You do this for keep things in order or because it buys you functionality?
>
> > Also, I haven't found yet a way to get nix root for nixpkgs imported as
> > external derivation, so after garbage collect I still have to
> > redownload some sources
>
> This is basically my experience. The method on the old wiki makes the
> environment survive `nix-channel --update` but not `nix-collect-garbage`
> which is weird because (as in the wiki) I explicitly asked for the .drv
> be a '--indirect --add-root' on $PWD.
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nix-shell and persistent environment

2016-10-01 Thread Ruben Astudillo

On 01/10/16 04:03, Daniel Hlynskyi wrote:
> To complete previous answer.
>
> I create a separate directory .nix-gc-roots, because nix-shell produces
> many roots.

You do this for keep things in order or because it buys you functionality?

> Also, I haven't found yet a way to get nix root for nixpkgs imported as
> external derivation, so after garbage collect I still have to
> redownload some sources

This is basically my experience. The method on the old wiki makes the
environment survive `nix-channel --update` but not `nix-collect-garbage`
which is weird because (as in the wiki) I explicitly asked for the .drv
be a '--indirect --add-root' on $PWD.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nix-shell and persistent environment

2016-10-01 Thread Daniel Hlynskyi
To complete previous answer.

I create a separate directory .nix-gc-roots, because nix-shell produces
many roots. Also, I haven't found yet a way to get nix root for nixpkgs
imported as external derivation, so after garbage collect I still have to
redownload some sources

30 вер. 2016 4:44 пп "Philipp Steinpaß"  пише:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> On Fri, Sep 30, 2016 at 10:30:27AM -0300, Ruben Astudillo wrote:
> > hi
> >
> > nix-shell is great, but when I update the nixpkgs or nix-collect-garbage
> > I lose the cache of those packages. I've thinking on do a special profile
> > that I could switch to per shell instance with nix-{shell,env}, but I
> > also found references to a deprecated buildEnv function for this. What is
> > the common alternative for this?
> >
> The old wiki has a guide for that.
> https://nixos.org/wiki/Development_Environments#
> Making_a_Persistent_nix-shell_Environment
>
> Philipp
> -BEGIN PGP SIGNATURE-
>
> iQGcBAEBCAAGBQJX7mwsAAoJENe9N53GUHbvaK4L/An67zN4X+rIdvSGGe014KcR
> ImGU4CNKE7QQectbpwXrXZaoWmD4vQHCDCTo/YchdANZmUvhvNUYAg2mjYsGlmyu
> pFont8PwT0QuObp1ngPjBb6/fFGEnqQV1gLvxvuv92THTe2pWYN2guC15c4DR/Oc
> EVvs9wr1BlMAUwTU3K0eD8/4ZGuMVZgI4TycGg3lnCp2JGziftXmrW7kluXglqKl
> e5CpiqLufPmUwd7VAPsYDEZsZ2+/1uWwZ8SsZHI9bfGxgWnUp0Yxp5cL6vm4Xu88
> cjYWhzVVPwImQfxq/scR5Xs4NR44tBiveG6Zt+H3qrzynisza6A/Kz2RyIs++OML
> pfMWSX58YvaICV/uOvzCQIjsHGLlEChdijrJUNbYMXQIIZyrJPFlHR8//Hsy//lG
> 9Z+MGpYdQtJvN3IXN2vVqITWY9OBOA02re1LQHlaA82o32tPO9vTJ99c/b7QVgPm
> m4l+6rfQEIL+1mG56Et5ftixpAY4XxlLQ2Queq41Wg==
> =sE0b
> -END PGP SIGNATURE-
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nix-shell and persistent environment

2016-09-30 Thread Philipp Steinpaß
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Fri, Sep 30, 2016 at 10:30:27AM -0300, Ruben Astudillo wrote:
> hi
> 
> nix-shell is great, but when I update the nixpkgs or nix-collect-garbage
> I lose the cache of those packages. I've thinking on do a special profile
> that I could switch to per shell instance with nix-{shell,env}, but I
> also found references to a deprecated buildEnv function for this. What is
> the common alternative for this?
> 
The old wiki has a guide for that.
https://nixos.org/wiki/Development_Environments#Making_a_Persistent_nix-shell_Environment

Philipp
-BEGIN PGP SIGNATURE-

iQGcBAEBCAAGBQJX7mwsAAoJENe9N53GUHbvaK4L/An67zN4X+rIdvSGGe014KcR
ImGU4CNKE7QQectbpwXrXZaoWmD4vQHCDCTo/YchdANZmUvhvNUYAg2mjYsGlmyu
pFont8PwT0QuObp1ngPjBb6/fFGEnqQV1gLvxvuv92THTe2pWYN2guC15c4DR/Oc
EVvs9wr1BlMAUwTU3K0eD8/4ZGuMVZgI4TycGg3lnCp2JGziftXmrW7kluXglqKl
e5CpiqLufPmUwd7VAPsYDEZsZ2+/1uWwZ8SsZHI9bfGxgWnUp0Yxp5cL6vm4Xu88
cjYWhzVVPwImQfxq/scR5Xs4NR44tBiveG6Zt+H3qrzynisza6A/Kz2RyIs++OML
pfMWSX58YvaICV/uOvzCQIjsHGLlEChdijrJUNbYMXQIIZyrJPFlHR8//Hsy//lG
9Z+MGpYdQtJvN3IXN2vVqITWY9OBOA02re1LQHlaA82o32tPO9vTJ99c/b7QVgPm
m4l+6rfQEIL+1mG56Et5ftixpAY4XxlLQ2Queq41Wg==
=sE0b
-END PGP SIGNATURE-
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] nix-shell and persistent environment

2016-09-30 Thread Ruben Astudillo

hi

nix-shell is great, but when I update the nixpkgs or nix-collect-garbage
I lose the cache of those packages. I've thinking on do a special profile
that I could switch to per shell instance with nix-{shell,env}, but I
also found references to a deprecated buildEnv function for this. What is
the common alternative for this?

-- Ruben
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev