Your one-stop-cake-shop for everything Freshly Baked has to offer

fix(npins): fetch dependencies from correct ref

We would previously get this error when fetching on new machines

… while fetching the input 'git+https://gerrit.wikimedia.org/r/mediawiki/extensions/AdvancedSearch?rev=398c9fa782843d8b3aeaa5ebb1c1b3db35c3382f'

error: Cannot find Git revision '398c9fa782843d8b3aeaa5ebb1c1b3db35c3382f' in ref 'refs/heads/master' of repository 'https://gerrit.wikimedia.org/r/mediawiki/extensions/AdvancedSearch'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.

Now, this is what I'd expect - because we're not meant to be fetching
master of this extension - we're meant to be fetching a branch! This
seems to be an issue with npins' fetchgit call, which misses out the ref

Due to a nilla bug, fetching dependencies is required for evaluation
so this prevented any evaluation

Changed files
+10 -4
packetmix
npins
+10 -4
packetmix/npins/default.nix
··· 85 url, 86 submodules, 87 rev, 88 name, 89 narHash, 90 }: 91 - pkgs.fetchgit { 92 inherit url rev name; 93 fetchSubmodules = submodules; 94 hash = narHash; 95 - }; 96 }; 97 98 # Dispatch to the correct code path based on the type ··· 124 repository, 125 revision, 126 url ? null, 127 submodules, 128 hash, 129 ... ··· 159 "${if matched == null then "source" else builtins.head matched}${appendShort}"; 160 name = urlToName url revision; 161 in 162 - fetchGit { 163 rev = revision; 164 narHash = hash; 165 166 inherit name submodules url; 167 - }; 168 169 mkPyPiSource = 170 { fetchurl, ... }:
··· 85 url, 86 submodules, 87 rev, 88 + branch ? null, 89 name, 90 narHash, 91 }: 92 + pkgs.fetchgit ({ 93 inherit url rev name; 94 fetchSubmodules = submodules; 95 hash = narHash; 96 + } // (if branch == null then {} else { 97 + ref = "refs/heads/${branch}"; 98 + })); 99 }; 100 101 # Dispatch to the correct code path based on the type ··· 127 repository, 128 revision, 129 url ? null, 130 + branch ? null, 131 submodules, 132 hash, 133 ... ··· 163 "${if matched == null then "source" else builtins.head matched}${appendShort}"; 164 name = urlToName url revision; 165 in 166 + fetchGit ({ 167 rev = revision; 168 narHash = hash; 169 170 inherit name submodules url; 171 + } // (if branch == null then {} else { 172 + ref = "refs/heads/${branch}"; 173 + })); 174 175 mkPyPiSource = 176 { fetchurl, ... }: