Skip to content

Commit

Permalink
fix(nix): buildVscodeExtension requires pname (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
brian14708 authored Dec 1, 2024
1 parent 35b72d7 commit 7b0ff73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 7b0ff73

Please sign in to comment.