Skip to content

Commit

Permalink
Exclude "emacs" when building repoToPin
Browse files Browse the repository at this point in the history
We consider all packages in esuper when looking for packages potentially
using pinned repos. Once nixpkgs adds a gitRepoUrl for packages fetched
from Savannah
(NixOS/nixpkgs@cf3f6be),
that includes "emacs", which causes infinite recursion populating
repoToPin.

Explicitly exclude "emacs" (and give ourselves a list to add other
"infrastructure" packages to).
  • Loading branch information
marienz committed Nov 2, 2024
1 parent 8f41e76 commit f42213c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,21 @@ let
version = snapshotVersion;
}
else epkg;
in
# Hack: we call makePackage for everything (not just doomPackageSet), just to hit the
# repoToPin check. We cannot easily call it just for transitive dependencies, because we
# need makePackage to figure out what the dependencies (for packages not in esuper) are...
# This seems to work ok in practice because makePackage is called lazily.
lib.mapAttrs makePackage ((lib.mapAttrs (name: (lib.const {})) esuper) // doomPackageSet)
# need makePackage to figure out what the dependencies (for packages not in esuper) are.
# But we do need some filtering (currently just "emacs" itself) to avoid infinite recursion
# while populating repoToPin.
upstreamWithPins = lib.mapAttrs
(n: p:
if lib.elem p [ esuper.emacs ]
then p
else makePackage n {})
esuper;
doomPackages = lib.mapAttrs makePackage doomPackageSet;
allPackages = upstreamWithPins // doomPackages;
in
allPackages
);

# Step 3: Build an emacsWithPackages, pulling all packages from step 1 from
Expand Down

0 comments on commit f42213c

Please sign in to comment.