[Nix-dev] Some beginner Nix/nixpkgs questions
Colin Putney
colin at wiresong.com
Wed Aug 5 20:35:20 CEST 2015
On Wed, Aug 5, 2015 at 4:53 AM, Alex Dean <alex at snowplowanalytics.com>
wrote:
> On reproducible deployments using git revisions - it solves the problem,
> but it feels like a very "out-of-band" solution.
>
You don't have to embed a git revision in your nix expressions; I don't
like that solution much either. What we do at BetterCompany is always refer
to nixpkgs by an expression like import <nixpkgs> {}. Then we have
$NIX_PATH include nixpkgs=~/.nix-defexpr/channels/nixpkgs. That means we
can manage our version of nixpkgs using nix-channel.
More generally, we include a default.nix and shell.nix in the root
directory of all our repositories, and then have another repository similar
to nixpkgs that bundles everything up, provides library functions etc.
That's also in $NIX_PATH, so we can use import <ourpkgs> {} to get access
to cross-repository dependencies, custom derivations functions etc.
Finally, we tie it all together with Hydra, Nixops and a bit of custom code
to help with deployments.
Hope this helps, and I'm happy to go into more detail if you have specific
questions.
Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150805/a2b114be/attachment-0001.html
More information about the nix-dev
mailing list