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 0cf192e
Showing 1 changed file with 4 additions and 6 deletions.
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 0cf192e

Please sign in to comment.