I'd recommend to fix the content address of your nixpkgs in order to make
your default.nix reproducible. Right now you're relying on an environment
variable that determines the revision of nixpkgs.
On 09/08/2016 8:53 PM, "Rodney Lorrimar" <[email protected]> wrote:

> Hello nix-dev,
>
> I was wondering, what is the best way to develop a project outside of
> nixpkgs? My current method is something like this:
>
>     # default.nix
>     { sampleproject ? { outPath = ./.; name = "sampleproject"; }
>     , pkgs ? import <nixpkgs> {}
>     }:
>     with pkgs.python35Packages;
>     buildPythonPackage rec {
>       name = "sampleproject-${version}";
>       version = "1.2.0";
>       src = [ sampleproject ];
>       propagatedBuildInputs = [ peppercorn ];
>     };
>
> (Full project example here: https://github.com/rvl/sampleproject)
>
> In many ways it works well, but I'm not entirely happy.
>
> The problem is that my entire work tree (and all the accumulated project
> cruft) gets copied into the nix store every time I run nix-build or
> nix-shell. This is slow and also prints the scary "may run out of
> memory" warning.
>
> Is there a function to load only the tracked files from a git work tree?
> Ideally this function would result in same store path if the files are
> the same, so nothing need be rebuilt if no sources changed.
>
>
> Cheers,
>
> Rodney
> _______________________________________________
> nix-dev mailing list
> [email protected]
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to