forked from jan-leila/nix-config
created custom vscode extension
This commit is contained in:
parent
3f3ae74fac
commit
358f039460
4 changed files with 53 additions and 0 deletions
|
@ -99,6 +99,11 @@ in {
|
|||
++ (lib.lists.optionals ai-tooling-enabled [
|
||||
])
|
||||
)
|
||||
++ (
|
||||
with pkgs.codium-extensions; [
|
||||
ai-code
|
||||
]
|
||||
)
|
||||
);
|
||||
};
|
||||
};
|
||||
|
|
42
modules/common-modules/pkgs/codium-extensions/ai-code.nix
Normal file
42
modules/common-modules/pkgs/codium-extensions/ai-code.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
buildNpmPackage,
|
||||
vscode-utils,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
version = "0.0.1";
|
||||
pname = "ai-code";
|
||||
publisher = "jan-leila";
|
||||
vsix = buildNpmPackage {
|
||||
inherit version pname;
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@git.jan-leila.com/jan-leila/ai-code.git";
|
||||
rev = "480b51830602b28009e6b5c5014e7e2970a0a3b3";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-WxLb+e0itOCIRXpVOjcbPm6QNWbdSKZOPeXLyOa4ROQ=";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
vsce
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
${pkgs.vsce}/bin/vsce package -o ${pname}.zip
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv ${pname}.zip $out/${pname}.zip
|
||||
'';
|
||||
};
|
||||
in
|
||||
vscode-utils.buildVscodeExtension {
|
||||
inherit pname version;
|
||||
|
||||
src = "${vsix}/${pname}.zip";
|
||||
|
||||
vscodeExtUniqueId = "${publisher}.${pname}";
|
||||
vscodeExtPublisher = publisher;
|
||||
vscodeExtName = pname;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
ai-code = pkgs.callPackage ./ai-code.nix {};
|
||||
}
|
|
@ -19,5 +19,8 @@
|
|||
(final: prev: {
|
||||
gdx-liftoff = pkgs.callPackage ./gdx-liftoff.nix {};
|
||||
})
|
||||
(final: prev: {
|
||||
codium-extensions = pkgs.callPackage ./codium-extensions {};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue