From f8c3bf45ce926658f4ba574b603495a616e22ab4 Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Wed, 31 Dec 2025 13:22:57 +0000 Subject: [PATCH] fix(npins): fetch dependencies from correct ref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: mlmuvqqtptltptrpoplrqrskvkxuptzn 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 --- packetmix/npins/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packetmix/npins/default.nix b/packetmix/npins/default.nix index b844b313..5c91ef88 100644 --- a/packetmix/npins/default.nix +++ b/packetmix/npins/default.nix @@ -85,14 +85,17 @@ let url, submodules, rev, + branch ? null, name, narHash, }: - pkgs.fetchgit { + pkgs.fetchgit ({ inherit url rev name; fetchSubmodules = submodules; hash = narHash; - }; + } // (if branch == null then {} else { + ref = "refs/heads/${branch}"; + })); }; # Dispatch to the correct code path based on the type -- 2.43.0