Skip to content

Commit

Permalink
fix(nix): buildVscodeExtension requires pname
Browse files Browse the repository at this point in the history
  • Loading branch information
brian14708 committed Dec 1, 2024
1 parent 35b72d7 commit 57816a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ../.;
});

Expand Down Expand Up @@ -52,15 +52,15 @@
};
};
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.")
(lib.checkListOfEnum "${pname}: accent" validAccents [accent])
(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];
Expand Down

0 comments on commit 57816a6

Please sign in to comment.