mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-01 18:33:56 +01:00
feat(computer-use): package computer-use-linux and cua-driver
Package the prebuilt releases (computer-use-linux v0.7.1 and cua-driver-rs v0.24.0) under pkgs/, injected through thin callPackage overlays so they are easy to relocate to the NUR repository later.
This commit is contained in:
1 parent
ef00eb31e0
commit
90761a6b73
4 files changed
+117
No files matched your search
@@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
autoPatchelfHook,
|
||||
}:
|
||||
let
|
||||
version = "0.7.1";
|
||||
|
||||
# Prebuilt release binaries; the crate is not packaged in nixpkgs.
|
||||
assets = {
|
||||
x86_64-linux = {
|
||||
target = "x86_64-unknown-linux-gnu";
|
||||
hash = "sha256-Wp91gQrUKBjIoxIeEsRug4MYgZ6o6bcaDJoqq+RmmbQ=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
target = "aarch64-unknown-linux-gnu";
|
||||
hash = "sha256-e376naC15EyNGfDN3ERTmvCPzd97v7WPzzVYq4zCjps=";
|
||||
};
|
||||
};
|
||||
|
||||
asset =
|
||||
assets.${stdenv.hostPlatform.system}
|
||||
or (throw "computer-use-linux: unsupported system ${stdenv.hostPlatform.system}");
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "computer-use-linux";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/agent-sh/computer-use-linux/releases/download/v${version}/computer-use-linux-${asset.target}";
|
||||
inherit (asset) hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
buildInputs = [ stdenv.cc.cc.lib ];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 $src $out/bin/computer-use-linux
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "MCP server and CLI to control a Linux desktop";
|
||||
homepage = "https://github.com/agent-sh/computer-use-linux";
|
||||
license = lib.licenses.mit;
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
mainProgram = "computer-use-linux";
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user