on iko/ghcjs-patch-master help sign in
Revert "Use builtins.fetchGit{allRefs=true;} if no ref provided." (#1274)

This reverts commit 9ccc486b9ff51e7f69c6420ded742a597be041fb. Unfortunately our hydra is built against an old version of nix which does not support this attribute.

commit13164ac0d826c3760dc364f3a6a9b349f8abc9ae authorJean-Baptiste Giraudeau <jean-baptiste.giraudeau@iohk.io> dateFri 22 Oct 2021, 18:27 (5 years ago) parenta32cbbd
2 files changed+3−13
lib/stack-cache-generator.nix+1−5 overlays/haskell.nix+2−8
lib/stack-cache-generator.nix+1−5
@@ -103,11 +103,7 @@ concatMap (dep:
103103 }
104104 else builtins.fetchGit ({
105105 inherit (dep) url rev;
106− } // (if branch != null
107− then { ref = branch; }
108− # Don't fail if rev not in default branch:
109− else { allRefs = true; })
110− );
106+ } // pkgs.lib.optionalAttrs (branch != null) { ref = branch; });
111107 in map (subdir: {
112108 name = cabalName "${pkgsrc}/${subdir}";
113109 inherit (dep) url rev;
overlays/haskell.nix+2−8
@@ -308,10 +308,7 @@ final: prev: {
308308 assert isNull sha256;
309309 builtins.fetchGit
310310 ({ inherit url rev; } //
311− (if ref != null
312− then { inherit ref; }
313− # Don't fail if rev not in default branch:
314− else { allRefs = true; })
311+ final.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
315312 )
316313 else
317314 # Non-private repos must have sha256 set.
@@ -405,10 +402,7 @@ final: prev: {
405402 then
406403 builtins.fetchGit
407404 ({ inherit url rev; } //
408− (if ref != null
409− then { inherit ref; }
410− # don't fail if rev not in default branch:
411− else { allRefs = true; })
405+ final.buildPackages.lib.optionalAttrs (ref != null) { inherit ref; }
412406 )
413407 else
414408 final.evalPackages.fetchgit { inherit url rev sha256; };