fix: resolve code quality issues, add CI, and improve maintainability
- Remove useless nixConfig block (cache.nixos.org is default) - Remove manual container-use override; let blueprint auto-discover it - Add nixosModules.default so README example works - Fix default launcher: use correct parameterized flake URL - Replace deprecated sha256 with hash in goose-cli fetchers - Fix LIBCLANG_PATH to include /lib subdirectory for libclang.so - Drop --release from goose-cli tests (faster, more debug info) - Use builtins.toFile in flake-inputs to avoid ARG_MAX risk - Add lib.warn when overlay has no packages for a system - Add passthru.updateScript to goose-cli, container-use, skillsmcp - Fix skillsmcp version to 0.2.0+unstable (pinned to commit, not tag) - Replace with lib; with explicit references in all meta blocks - Add update.py script for goose-cli (referenced in AGENTS.md) - Expand .gitignore with result-* and .direnv/ - Add GitHub Actions CI workflow (nix flake check + build)
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
fetchurl {
|
||||
name = "librusty_v8-${args.version}";
|
||||
url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz";
|
||||
sha256 = args.shas.${stdenv.hostPlatform.system};
|
||||
hash = args.shas.${stdenv.hostPlatform.system};
|
||||
meta = {
|
||||
inherit (args) version;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
|
||||
@@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec {
|
||||
env.RUSTY_V8_ARCHIVE = librusty_v8;
|
||||
|
||||
# bindgen (used by llama-cpp-sys-2) needs libclang
|
||||
env.LIBCLANG_PATH = llvmPackages.libclang.lib;
|
||||
env.LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||
|
||||
# Build only the CLI package
|
||||
cargoBuildFlags = [
|
||||
@@ -59,21 +59,28 @@ rustPlatform.buildRustPackage rec {
|
||||
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
|
||||
cargo test --package goose-cli
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
passthru.category = "AI Coding Agents";
|
||||
passthru = {
|
||||
category = "AI Coding Agents";
|
||||
updateScript = [
|
||||
"nix-update"
|
||||
"--flake"
|
||||
".#goose-cli"
|
||||
];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
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 ];
|
||||
license = lib.licenses.asl20;
|
||||
sourceProvenance = with lib.sourceTypes; [ fromSource ];
|
||||
mainProgram = "goose";
|
||||
platforms = platforms.all;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
26
packages/goose-cli/update.py
Normal file
26
packages/goose-cli/update.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i python3 -p python3 nix-update
|
||||
|
||||
"""
|
||||
Update script for goose-cli package.
|
||||
|
||||
This script uses nix-update to fetch the latest version of goose-cli
|
||||
and update the package.nix file with the new version, src hash, and cargoHash.
|
||||
It also updates the librusty_v8 hashes via the custom fetchers.nix.
|
||||
|
||||
Usage:
|
||||
./update.py # Update to latest release
|
||||
./update.py --version 1.34.0 # Update to specific version
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
args = ["nix-update", "--flake", ".#goose-cli"] + sys.argv[1:]
|
||||
subprocess.check_call(args)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user