on master help sign in
asset: Fix chunkDerivations
commit0ce1de038e68a0ec223df185c5888a52c98cf103 authorAli Abrar <aliabrar@gmail.com> dateFri 16 Feb 2018, 00:53 (9 years ago) parent7558aee
1 file changed+3−2
lib/asset/assets.nix+3−2
lib/asset/assets.nix+3−2
@@ -103,9 +103,9 @@ mapSnds = f: l: zipLists (map (x: x.fst) l) (f (map (x: x.snd) l));
103103chunkDerivations = n: l:
104104 let a = take n l;
105105 b = drop n l;
106− go = x: if x == [] then builtins.toFile "emptyList.nix" "[]" else chunkDerivations2 n (take n x) (go (drop n x));
106+ go = x: if x == [] then builtins.toFile "emptyList.nix" "[]" else makeChunkDerivation (take n x) (go (drop n x));
107107
108− # makeChunkDerivation :: Int -> [a] -> ExprFile [a] -> ExprFile [a]
108+ # makeChunkDerivation :: [a] -> ExprFile [a] -> ExprFile [a]
109109 makeChunkDerivation = chunk': next:
110110 let chunk = map (path: "(import ${builtins.unsafeDiscardOutputDependency path.drvPath}).${path.outputName}") chunk';
111111 in builtins.seq (builtins.toPath next) (nixpkgs.stdenv.mkDerivation {
@@ -120,6 +120,7 @@ chunkDerivations = n: l:
120120 echo "[ $chunk ] ++ (import $next)" >"$out"
121121 '';
122122 });
123+
123124 in a ++ import (go b);
124125
125126# Recursively map some function over a @AttrSet DirEntry@, unioning the results of the application at each level.