From cbe7d2586a6f65179f2966459aa0181f41655419 Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Sat, 18 May 2024 15:35:08 +1000 Subject: [PATCH] Attempt to fix emms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI fails to fetch it: ``` error: Server does not allow request for unadvertised object 87d0d1fb0566a80229029d0d8d7c863138d70aae warning: could not update mtime for file '/home/runner/.cache/nix/gitv3/0gjpwip102kwcvz961gsiva3lqmmr6266s5wzs8kq0ybm68gwpx9/refs/heads/master': No such file or directory error: … while checking flake output 'checks' at /nix/store/fwrwzxjvvpx1l27h8j5f9gffzwn2vdik-source/flake.nix:54:7: 53| in { 54| checks = perSystemPackages (pkgs: | ^ 55| let … while checking the derivation 'checks.x86_64-linux.full' at /nix/store/fwrwzxjvvpx1l27h8j5f9gffzwn2vdik-source/flake.nix:83:11: 82| })).emacsWithDoom; 83| full = mkDoom { | ^ 84| full = true; (stack trace truncated; use '--show-trace' to show the full trace) error: Cannot find Git revision '87d0d1fb0566a80229029d0d8d7c863138d70aae' in ref 'refs/heads/master' of repository 'https://git.savannah.gnu.org/git/emms.git'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit. ``` Try to follow the suggestions from the error message, as I do see the commit in https://git.savannah.gnu.org/cgit/emms.git/. I'm not sure why this is only failing now... --- default.nix | 3 ++- fetch-overrides.nix | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index a96232f..188f0fd 100644 --- a/default.nix +++ b/default.nix @@ -52,7 +52,7 @@ }: let inherit (lib) optionalAttrs optionalString; - inherit (import ./fetch-overrides.nix) extraPins extraUrls; + inherit (import ./fetch-overrides.nix) extraPins extraUrls allRefsRepos; # Step 1: determine which Emacs packages to pull in. # @@ -237,6 +237,7 @@ let { inherit url; rev = pin; + allRefs = allRefsRepos.${url} or false; submodules = !(p.recipe.nonrecursive or false); # TODO: pull ref from derivation.src when not pulling it from p.recipe? # Note Doom does have packages with pin + branch (or nonrecursive) set, diff --git a/fetch-overrides.nix b/fetch-overrides.nix index 9151a4a..fda9422 100644 --- a/fetch-overrides.nix +++ b/fetch-overrides.nix @@ -34,4 +34,9 @@ # Looks stable enough we can get away with pinning it. "sly-stepper" = "da84e3bba8466c2290c2dc7c27d7f4c48c27b39e"; }; + + # TODO figure out whether we're better off always setting allRefs. + allRefsRepos = { + "https://git.savannah.gnu.org/git/emms.git" = true; + }; }