diff --git a/doom.nix b/doom.nix index 255fec5..6231874 100644 --- a/doom.nix +++ b/doom.nix @@ -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: diff --git a/fetch-overrides.nix b/fetch-overrides.nix new file mode 100644 index 0000000..e44e40a --- /dev/null +++ b/fetch-overrides.nix @@ -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"; + }; +}