Hi, On 03/02/2017 08:01 AM, Ganesh Sittampalam wrote:
> I guess that in this case the large tree is the import of the nixpkgs > tree. Is there any work around or better way to achieve what I want? The better way is to use builtins.fetchTarball: with import (fetchTarball { url = https://github.com/NixOS/nixpkgs/archive/264d42b.tar.gz; sha256 = "19i77afcns8mf88vkxvm3jvkzdkf5x8p8kxnnivhd9l4kslkq3v5"; }) {}; { env = stdenv.mkDerivation rec { ... }; }; } This also prevents a double evaluation of Nixpkgs. However, this won't work if you really need to fetch from a local Git repository. Nix 1.12 has a builtin fetchgit function that allows you to say with import (builtins.fetchgit { url = <nixpkgs>; rev = "..."; }) {}; ... (I just pushed a fix to allow "url" to refer to paths.) -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev