From cfd755015c3a018eb2bc38bf53376672a0e51eac Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Sat, 20 Jul 2024 13:53:40 +1000 Subject: [PATCH] Deal with agda2-mode / agda-input merge agda2-mode and agda-input live in the same upstream repository. Doom handles these as separate packages (with recipes installing agda-input.el as agda-input and everything else as agda2-mode), but nixpkgs has just agda2-mode, with installing agda-input now triggering an explicit error. Work around this by by filtering out agda-input from doomPackageSet, so we do not attempt to build/install it. We generate packages.el one step earlier, but we want an `:ignore t` package in there, which we also write for packages we actually install. So this should work correctly. Although agda-input is available as a separate package in nixpkgs 24.05, its agda2-mode package already installs agda-input.el too. So this change should be correct there too, even though it is not (yet) required. Adding a placeholder agda-input package to our elisp-packages.nix does not work, because our repoToPins logic accesses `esuper.${name}`, triggering the new build error. --- default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 25689dd..d35351c 100644 --- a/default.nix +++ b/default.nix @@ -80,7 +80,10 @@ let scriptArgs = "-o $out"; }; - doomPackageSet = lib.importJSON "${doomIntermediates}/packages.json"; + # Ignore agda-input: nixpkgs installs this as part of agda2-mode. + doomPackageSet = lib.filterAttrs + (n: v: n != "agda-input") + (lib.importJSON "${doomIntermediates}/packages.json"); # Step 2: override Emacs packages to respect Doom's pins. doomEmacsPackages = (emacsPackagesFor emacs).overrideScope (