@@ -13,6 +13,13 @@
13 if sha256map != null
13 if sha256map != null
14 then { location, tag, ...}: sha256map."${location}"."${tag}"
14 then { location, tag, ...}: sha256map."${location}"."${tag}"
15 else _: null
15 else _: null
17+ # A way to specify in which branch a git commit can
21+ then { location, tag, ...}: branchMap."${location}"."${tag}" or null
16, resolverSha256 ? null
23, resolverSha256 ? null
17, nix-tools ? pkgs.haskell-nix.internal-nix-tools # When building stack projects we use the internal nix-tools (compiled with a fixed GHC version)
24, nix-tools ? pkgs.haskell-nix.internal-nix-tools # When building stack projects we use the internal nix-tools (compiled with a fixed GHC version)
@@ -84,15 +91,19 @@ concatMap (dep:
84 location = dep.url;
91 location = dep.url;
85 tag = dep.rev;
92 tag = dep.rev;
94+ branch = lookupBranch {
88 if !is-private && sha256 != null
99 if !is-private && sha256 != null
89 then pkgs.fetchgit {
100 then pkgs.fetchgit {
90 inherit (dep) url rev;
101 inherit (dep) url rev;
91 inherit sha256;
102 inherit sha256;
93− else builtins.fetchGit {
104+ else builtins.fetchGit ({
94 inherit (dep) url rev;
105 inherit (dep) url rev;
95− };
106+ } // pkgs.lib.optionalAttrs (branch != null) { ref = branch; });
96 in map (subdir: {
107 in map (subdir: {
97 name = cabalName "${pkgsrc}/${subdir}";
108 name = cabalName "${pkgsrc}/${subdir}";
98 inherit (dep) url rev;
109 inherit (dep) url rev;