mirror of
https://github.com/EdenQwQ/nixos.git
synced 2025-12-26 10:14:58 +08:00
add qwen-code
This commit is contained in:
parent
89a29bdf0b
commit
d94490b18a
3 changed files with 58 additions and 0 deletions
|
|
@ -8,4 +8,5 @@
|
|||
custom-colorschemes = pkgs.callPackage ./customColorSchemes { };
|
||||
wallpapers = pkgs.callPackage ./wallpapers.nix { };
|
||||
maple-mono-variable = pkgs.callPackage ./maple-mono-variable.nix { };
|
||||
qwen-code = pkgs.callPackage ./qwen-code.nix { };
|
||||
}
|
||||
|
|
|
|||
56
pkgs/qwen-code.nix
Normal file
56
pkgs/qwen-code.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# copied from https://github.com/NixOS/nixpkgs/issues/427851#issuecomment-3115131890
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
fetchNpmDeps,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "qwen-code";
|
||||
version = "unstable-2025-07-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sid115";
|
||||
repo = "qwen-code";
|
||||
rev = "e082e301bf2e779435237aab56927b204ead5d2e";
|
||||
hash = "sha256-qX2ssemIt3Ijl9GxCgurcXg5B5ZC2D6cRjGqD9G8Ksg=";
|
||||
};
|
||||
|
||||
npmDeps = fetchNpmDeps {
|
||||
inherit (finalAttrs) src;
|
||||
hash = "sha256-zzF/9V+g3uxZxCGmIIHplDX8IRd2txbLj9lco+pkkWg=";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
npm run generate
|
||||
npm run bundle
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -r bundle/* $out/
|
||||
substituteInPlace $out/gemini.js --replace '/usr/bin/env node' "$(type -p node)"
|
||||
ln -s $out/gemini.js $out/bin/qwen-code
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Qwen-code is a coding agent that lives in digital world";
|
||||
homepage = "https://github.com/QwenLM/qwen-code";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
mainProgram = "qwen-code";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue