From 57816a6c014f0a5d4ccc22e0637120918a008af0 Mon Sep 17 00:00:00 2001 From: Brian Li Date: Sat, 30 Nov 2024 16:59:41 +0800 Subject: [PATCH] fix(nix): buildVscodeExtension requires pname --- nix/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index bf36f336..a98465c4 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -19,12 +19,12 @@ validWorkbenchModes = properties."catppuccin.workbenchMode".enum; validBracketModes = properties."catppuccin.bracketMode".enum; - inherit (packageJSON) name version; - pname = "${name}-${version}"; + inherit (packageJSON) version; + pname = packageJSON.name; options = builtins.removeAttrs inputs ["pkgs"]; src = pkgs.nix-gitignore.gitignoreSource [] (builtins.path { - name = pname; + name = "${pname}-${version}"; path = ../.; }); @@ -52,7 +52,7 @@ }; }; vscodeExtPublisher = "catppuccin"; - vscodeExtName = name; + vscodeExtName = pname; vscodeExtUniqueId = "${vscodeExtPublisher}.${vscodeExtName}"; in (lib.throwIfNot (accentColor == null) "${pname}: deprecated option 'accentColor' is no longer supported, please use 'accent' instead.") @@ -60,7 +60,7 @@ in (lib.checkListOfEnum "${pname}: workbenchMode" validWorkbenchModes [workbenchMode]) (lib.checkListOfEnum "${pname}: bracketMode" validBracketModes [bracketMode]) (pkgs.vscode-utils.buildVscodeExtension { - inherit name version vscodeExtPublisher vscodeExtName vscodeExtUniqueId; + inherit pname version vscodeExtPublisher vscodeExtName vscodeExtUniqueId; src = builder.outPath; buildInputs = [pkgs.nodejs];