Skip to content

Commit

Permalink
build(nix): accent -> accentColor, use removeAttrs
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Sep 12, 2023
1 parent f5993c2 commit 818e4b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ This means that you will have to either
programs.vscode.extensions = [
# all the theme options will be available as overrides:
(pkgs.catppuccin-vsc.override {
accent = "mauve";
accentColor = "mauve";
boldKeywords = true;
italicComments = true;
italicKeywords = true;
Expand Down
10 changes: 4 additions & 6 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
pkgs ? import <nixpkgs> {},
accent ? "mauve",
accentColor ? "mauve",
boldKeywords ? true,
italicComments ? true,
italicKeywords ? true,
Expand All @@ -9,7 +9,7 @@
bracketMode ? "rainbow",
colorOverrides ? {},
customUIColors ? {},
}: let
} @ inputs: let
inherit (pkgs) lib;

packageJSON = builtins.fromJSON (builtins.readFile ./package.json);
Expand All @@ -21,9 +21,7 @@
inherit (packageJSON) name version;
pname = "${name}-${version}";

options = {
inherit accent boldKeywords italicComments italicKeywords colorOverrides workbenchMode bracketMode extraBordersEnabled customUIColors;
};
options = builtins.removeAttrs inputs ["pkgs"];
project =
(pkgs.callPackage ./yarn-project.nix {} {
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
Expand All @@ -46,7 +44,7 @@
'';
});
in
(lib.checkListOfEnum "${pname}: accent" validAccents [accent])
(lib.checkListOfEnum "${pname}: accent" validAccents [accentColor])
(lib.checkListOfEnum "${pname}: workbenchMode" validWorkbenchModes [workbenchMode])
(lib.checkListOfEnum "${pname}: bracketMode" validBracketModes [bracketMode])
pkgs.vscode-utils.buildVscodeMarketplaceExtension {
Expand Down

0 comments on commit 818e4b5

Please sign in to comment.