[Nix-dev] How to make package/project dependencies a profile?

Domen Kožar domen at dev.si
Sun Feb 22 18:09:13 CET 2015


I just do `nix-shell --add-root result` as I have result in global
.gitignore.

Could be done easier probably :)

On Sun, Feb 22, 2015 at 7:25 AM, Michael Ekstrand <michael at elehack.net>
wrote:

> In the source directory for one of my local projects, I have created a
> 'default.nix' file that pulls in all the packages required to work on
> the project as build inputs, so I can just run 'nix-shell' in the
> project directory and start working.
>
> I'd like to register these dependencies with the GC so that nix-store
> --gc doesn't force a redownload/rebuild next time I run the project.
>
> I've used the following:
>
> nix-shell --add-root /nix/var/nix/gcroots/per-user/michael/wwwshell
>
> Is that the best way to do this?  It produces quite a few symlinks (one
> per dependency).
>
> Is there some (easy) way to make a profile/package/derivation that pulls
> in all the build inputs of some package, so that I can have a single
> thing to make a GC root?  I don't want to make them propagated inputs &
> install the project as a 'package', because in the long run the output
> of this project (the content of my web site) doesn't really depend at
> runtime on the packages needed to build it.
>
> Thanks,
> - Michael
>
> --
> Michael Ekstrand — http://elehack.net/
> Confused by strange attachments? See https://elehack.net/pgp/
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150222/437b7218/attachment-0001.html 


More information about the nix-dev mailing list