Refactor doomdirs generation slightly

...in preparation for adding an "almost all flags" doomdir.
This commit is contained in:
Marien Zwart 2024-06-29 20:02:19 +10:00
parent 96ae6b4a0d
commit cd94c45e8d
No known key found for this signature in database
3 changed files with 8 additions and 9 deletions

View file

@ -18,14 +18,14 @@
emacs,
}:
{
doomDirWithAllModules = callPackage ./doomscript.nix {
allModules = callPackage ./doomscript.nix {
name = "doom-full-init";
inherit doomSource emacs;
script = ./full-init;
scriptArgs = "-o $out";
};
doomDirWithAllModulesAndFlags = callPackage ./doomscript.nix {
allModulesAndFlags = callPackage ./doomscript.nix {
name = "doom-full-init";
inherit doomSource emacs;
script = ./full-init;

View file

@ -30,8 +30,7 @@
}:
let
inherit (lib.generators) toPretty;
inherit (callPackages ./build-helpers/full-init.nix { inherit doomSource; })
doomDirWithAllModules doomDirWithAllModulesAndFlags;
doomDirs = callPackages ./build-helpers/doomdirs.nix { inherit doomSource; };
common = {
doomLocalDir = "~/.local/share/nix-doom-unstraightened";
experimentalFetchTree = true;
@ -72,8 +71,8 @@ in {
doomDir = minimalDoomDir;
extraPackages = epkgs: [ epkgs.vterm epkgs.treesit-grammars.with-all-grammars ];
};
allModules = mkDoom { doomDir = doomDirWithAllModules; };
allModulesAndFlags = mkDoom { doomDir = doomDirWithAllModulesAndFlags; };
allModules = mkDoom { doomDir = doomDirs.allModules; };
allModulesAndFlags = mkDoom { doomDir = doomDirs.allModulesAndFlags; };
example = mkDoom { doomDir = ./doomdir; };
example-without-loader = mkDoom {
doomDir = ./doomdir;

View file

@ -98,15 +98,15 @@
}).doomEmacs;
# TODO: cache more packages, cache for more Emacsen.
cachix-packages = let
inherit (pkgs.callPackages ./build-helpers/full-init.nix {
doomDirs = pkgs.callPackages ./build-helpers/doomdirs.nix {
doomSource = doomemacs;
}) doomDirWithAllModules;
};
in
pkgs.linkFarm "unstraightened-cachix-packages" {
inherit doomemacs;
full-emacs29 = (doomFromPackages pkgs {
emacs = pkgs.emacs29;
doomDir = doomDirWithAllModules;
doomDir = doomDirs.allModules;
doomLocalDir = "~/.local/share/nix-doom-unstraightened";
experimentalFetchTree = true;
}).doomEmacs.emacsWithPackages.deps;