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

Michael Ekstrand michael at elehack.net
Sun Feb 22 16:25:56 CET 2015


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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150222/8f15858a/attachment.bin 


More information about the nix-dev mailing list