Pull fetch overrides out of doom.nix

No reason, they just felt out of place.
This commit is contained in:
Marien Zwart 2024-04-27 21:28:39 +10:00
parent 68d5ec704b
commit c09022717d
No known key found for this signature in database
2 changed files with 24 additions and 23 deletions

View file

@ -36,6 +36,7 @@
}:
let
inherit (lib) optionalAttrs optionalString;
inherit (import ./fetch-overrides.nix) extraPins extraUrls;
# Step 1: determine which Emacs packages to pull in.
#
@ -68,29 +69,6 @@ let
doomPackageSet = lib.importJSON "${doomIntermediates}/packages.json";
# URLs for a few packages used by Doom that have straight recipes but are not
# in nixpkgs.
extraUrls = {
# Straight recipe from el-get
font-lock-ext = "https://github.com/sensorflo/font-lock-ext.git";
sln-mode = "https://github.com/sensorflo/sln-mode.git";
# Straight recipe from emacsmirror-mirror
nose = "https://github.com/emacsattic/nose.git";
# In nixpkgs, but uses codeberg, for which nixpkgs uses fetchzip.
# TODO: consider parsing origEPkg.src.url instead.
tree-sitter-indent = "https://codeberg.org/FelipeLema/tree-sitter-indent.el.git";
undo-fu = "https://codeberg.org/ideasman42/emacs-undo-fu.git";
undo-fu-session = "https://codeberg.org/ideasman42/emacs-undo-fu-session.git";
# nixpkgs uses a release from nongnu ELPA.
corfu-terminal = "https://codeberg.org/akib/emacs-corfu-terminal";
};
# Pins for packages not pinned by Doom and not in nixpkgs or emacs-overlay.
extraPins = {
# Looks stable enough we can get away with pinning it.
"sly-stepper" = "da84e3bba8466c2290c2dc7c27d7f4c48c27b39e";
};
# Step 2: override Emacs packages to respect Doom's pins.
doomEmacsPackages = (emacsPackagesFor emacs).overrideScope (
eself: esuper:

23
fetch-overrides.nix Normal file
View file

@ -0,0 +1,23 @@
# Data loaded by doom.nix.
{
extraUrls = {
# Straight recipe from el-get
font-lock-ext = "https://github.com/sensorflo/font-lock-ext.git";
sln-mode = "https://github.com/sensorflo/sln-mode.git";
# Straight recipe from emacsmirror-mirror
nose = "https://github.com/emacsattic/nose.git";
# In nixpkgs, but uses codeberg, for which nixpkgs uses fetchzip.
# TODO: consider parsing origEPkg.src.url instead.
tree-sitter-indent = "https://codeberg.org/FelipeLema/tree-sitter-indent.el.git";
undo-fu = "https://codeberg.org/ideasman42/emacs-undo-fu.git";
undo-fu-session = "https://codeberg.org/ideasman42/emacs-undo-fu-session.git";
# nixpkgs uses a release from nongnu ELPA.
corfu-terminal = "https://codeberg.org/akib/emacs-corfu-terminal";
};
# Pins for packages not pinned by Doom and not in nixpkgs or emacs-overlay.
extraPins = {
# Looks stable enough we can get away with pinning it.
"sly-stepper" = "da84e3bba8466c2290c2dc7c27d7f4c48c27b39e";
};
}