- Add meta.platforms to all packages for proper platform detection - Add passthru.category to mcp-gateway for consistency - Fix meta style inconsistency in mcp-gateway (lib.licenses → licenses) - Fix pythonImportsCheck in skillsmcp to actually validate the import - Remove empty maintainers list from skillsmcp - Add libclang to goose-cli nativeBuildInputs (fixes bindgen/llama-cpp-sys-2 build) - Add treefmt.toml with nixfmt formatter configuration - Add nixConfig.extra-substituters for binary cache support - Delete broken goose-cli/update.py (referenced missing scripts/updater.py) - Document nix-update usage in AGENTS.md for package updates - Fix stale project structure diagram in README
80 lines
1.9 KiB
Nix
80 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pkg-config,
|
|
openssl,
|
|
libxcb,
|
|
dbus,
|
|
versionCheckHook,
|
|
librusty_v8,
|
|
llvmPackages,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "goose-cli";
|
|
version = "1.33.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "block";
|
|
repo = "goose";
|
|
rev = "v${version}";
|
|
hash = "sha256-FBICGOfVs2jbOdLWSInqfTYBdnCcbcGWHwqY/b6v8eg=";
|
|
};
|
|
|
|
cargoHash = "sha256-fN0FKDYFkZrQQPWdUlemOaGzIAZhqFyskz9TEmG+X4o=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
llvmPackages.libclang
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
libxcb
|
|
dbus
|
|
];
|
|
|
|
# The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem
|
|
# To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE
|
|
env.RUSTY_V8_ARCHIVE = librusty_v8;
|
|
|
|
# bindgen (used by llama-cpp-sys-2) needs libclang
|
|
env.LIBCLANG_PATH = llvmPackages.libclang.lib;
|
|
|
|
# Build only the CLI package
|
|
cargoBuildFlags = [
|
|
"--package"
|
|
"goose-cli"
|
|
];
|
|
|
|
# Enable tests with proper environment
|
|
doCheck = true;
|
|
checkPhase = ''
|
|
export HOME=$(mktemp -d)
|
|
export XDG_CONFIG_HOME=$HOME/.config
|
|
export XDG_DATA_HOME=$HOME/.local/share
|
|
export XDG_STATE_HOME=$HOME/.local/state
|
|
export XDG_CACHE_HOME=$HOME/.cache
|
|
mkdir -p $XDG_CONFIG_HOME $XDG_DATA_HOME $XDG_STATE_HOME $XDG_CACHE_HOME
|
|
|
|
# Run tests for goose-cli package only
|
|
cargo test --package goose-cli --release
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
passthru.category = "AI Coding Agents";
|
|
|
|
meta = with lib; {
|
|
description = "CLI for Goose - a local, extensible, open source AI agent that automates engineering tasks";
|
|
homepage = "https://github.com/block/goose";
|
|
changelog = "https://github.com/block/goose/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
sourceProvenance = with sourceTypes; [ fromSource ];
|
|
mainProgram = "goose";
|
|
platforms = platforms.all;
|
|
};
|
|
}
|