feat: cleaned up ai tooling
This commit is contained in:
parent
4eb36ddfc7
commit
0ca99c1835
19 changed files with 48 additions and 4668 deletions
4102
modules/nixos/pkgs/cline/cline-package-lock.json
generated
4102
modules/nixos/pkgs/cline/cline-package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,63 +0,0 @@
|
|||
{...}: let
|
||||
package = {
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchurl,
|
||||
ripgrep,
|
||||
makeWrapper,
|
||||
jq,
|
||||
...
|
||||
}:
|
||||
buildNpmPackage rec {
|
||||
pname = "cline";
|
||||
version = "2.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/cline/-/cline-${version}.tgz";
|
||||
hash = "sha256-2utOBC0vhoj5fR+cG+Vdo3N6+i/pNW1E4mESF/dZS/c=";
|
||||
};
|
||||
|
||||
sourceRoot = "package";
|
||||
|
||||
postPatch = ''
|
||||
cp ${./cline-package-lock.json} package-lock.json
|
||||
|
||||
# Remove @vscode/ripgrep from package.json since it tries to download
|
||||
# a binary from GitHub during install, which fails in the nix sandbox.
|
||||
# We provide ripgrep from nixpkgs instead via PATH wrapping.
|
||||
# Also remove the man field since the man page is not included in the npm tarball.
|
||||
${jq}/bin/jq 'del(.dependencies["@vscode/ripgrep"]) | del(.man)' package.json > package.json.tmp
|
||||
mv package.json.tmp package.json
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-oHo60ghR7A4SUT0cLmIe7glPDYBK3twJ0F71RKVrxQc=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
# Skip post-install scripts to be safe
|
||||
npmFlags = ["--ignore-scripts"];
|
||||
|
||||
nativeBuildInputs = [makeWrapper jq];
|
||||
|
||||
# Provide ripgrep from nixpkgs since @vscode/ripgrep was removed
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/cline \
|
||||
--prefix PATH : ${lib.makeBinPath [ripgrep]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more";
|
||||
homepage = "https://cline.bot";
|
||||
license = licenses.asl20;
|
||||
mainProgram = "cline";
|
||||
};
|
||||
};
|
||||
in {
|
||||
flake.commonModules.cline = {pkgs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
cline = pkgs.callPackage package {};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
{...}: let
|
||||
package = {
|
||||
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 = "d48e01713021dbb30de0ebbee2cfaf99e4e9b5a6";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-kjMyEnT3dz0yH5Ydh+aGoFDocKpBYGRmfnwbEdvvgpY=";
|
||||
|
||||
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;
|
||||
};
|
||||
in {
|
||||
flake.commonModules.codium-ai-code = package;
|
||||
}
|
||||
|
|
@ -2,9 +2,7 @@
|
|||
flake.commonModules.codium-extensions = {pkgs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
codium-extensions = {
|
||||
ai-code = pkgs.callPackage config.flake.commonModules.codium-ai-code {};
|
||||
};
|
||||
codium-extensions = {};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ in {
|
|||
pkg.mapillary-uploader
|
||||
pkg.panoramax
|
||||
pkg.sgblur
|
||||
pkg.cline
|
||||
pkg.codium-extensions
|
||||
pkg.firefox-extensions
|
||||
pkg.python
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue