Skip to content

Commit

Permalink
Merge pull request #146 from emacs-twist/registries
Browse files Browse the repository at this point in the history
Rename the argument inventories to registries
  • Loading branch information
akirak authored Dec 2, 2023
2 parents 4f17e8b + 8596451 commit 09742dc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions pkgs/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
}: {
emacsPackage ? pkgs.emacs,
lockDir,
inventories,
inventories ? null,
registries ?
if inventories == null
then builtins.abort "emacsTwist: registries is a required argument"
else lib.warn "emacsTwist: inventories is deprecated. Use registries instead." inventories,
initFiles,
initParser ? lib.parseUsePackages {},
initReader ? file: initParser (builtins.readFile file),
Expand Down Expand Up @@ -95,9 +99,10 @@ in
flakeLockFile
archiveLockFile
builtinLibraries
inventories
inputOverrides
;
# Just remap the name
inventories = registries;
elispPackagePins = userConfig.elispPackagePins or {};
};

Expand Down
3 changes: 2 additions & 1 deletion template/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
emacsPackage = pkgsForEmacs.emacsUnstable.overrideAttrs (_: {
version = "28.0.91";
});
inventories = import ./inventories.nix inputs;

registries = import ./registries.nix inputs;
lockDir = ./lock;
initFiles = [
./init.el
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/twist-minimal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ emacsTwist {
inherit emacsPackage;
initFiles = [];
lockDir = ./lock;
inventories = [];
registries = [];
}
2 changes: 1 addition & 1 deletion test/twist.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ emacsTwist {
];
lockDir = ./lock;
inherit initialLibraries;
inventories = [
registries = [
{
type = "elpa";
path = inputs.gnu-elpa.outPath + "/elpa-packages";
Expand Down

0 comments on commit 09742dc

Please sign in to comment.