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
+5 -2
packetmix
npins
+5 -2
packetmix/npins/default.nix
··· 85 85 url, 86 86 submodules, 87 87 rev, 88 + branch ? null, 88 89 name, 89 90 narHash, 90 91 }: 91 - pkgs.fetchgit { 92 + pkgs.fetchgit ({ 92 93 inherit url rev name; 93 94 fetchSubmodules = submodules; 94 95 hash = narHash; 95 - }; 96 + } // (if branch == null then {} else { 97 + ref = "refs/heads/${branch}"; 98 + })); 96 99 }; 97 100 98 101 # Dispatch to the correct code path based on the type