From 818e4b5fcd774a2ca047aefb3d230f074bc33a69 Mon Sep 17 00:00:00 2001 From: winston Date: Tue, 12 Sep 2023 04:43:34 +0200 Subject: [PATCH] build(nix): `accent` -> `accentColor`, use `removeAttrs` --- README.md | 2 +- default.nix | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0a6c0664..8bdf4bac 100644 --- a/README.md +++ b/README.md @@ -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; diff --git a/default.nix b/default.nix index 3bbe85ef..1b4daae1 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,6 @@ { pkgs ? import {}, - accent ? "mauve", + accentColor ? "mauve", boldKeywords ? true, italicComments ? true, italicKeywords ? true, @@ -9,7 +9,7 @@ bracketMode ? "rainbow", colorOverrides ? {}, customUIColors ? {}, -}: let +} @ inputs: let inherit (pkgs) lib; packageJSON = builtins.fromJSON (builtins.readFile ./package.json); @@ -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 [] ./.; @@ -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 {