feat: installed cline package
This commit is contained in:
parent
2efb17d30c
commit
0e1c8d0d4f
4 changed files with 4188 additions and 0 deletions
4102
modules/common-modules/pkgs/cline/cline-package-lock.json
generated
Normal file
4102
modules/common-modules/pkgs/cline/cline-package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
53
modules/common-modules/pkgs/cline/default.nix
Normal file
53
modules/common-modules/pkgs/cline/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
|
@ -44,5 +44,8 @@
|
|||
# Override h3 C library to version 4.3.0
|
||||
h3 = pkgs.callPackage ./h3-c-lib.nix {};
|
||||
})
|
||||
(final: prev: {
|
||||
cline = pkgs.callPackage ./cline/default.nix {};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue