029d84940d
Pin upstream release commit d6627d7c ("1.0.0 (#6)"), update src hash.
Cargo.lock is byte-identical to the previous pin, so cargoHash is unchanged.
76 lines
2.6 KiB
Nix
76 lines
2.6 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
cacert,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "marmel";
|
|
# Upstream publishes no git tags, so this is pinned to the 1.0.0 release
|
|
# commit ("1.0.0 (#6)").
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Na1w";
|
|
repo = "marmel";
|
|
rev = "d6627d7cf3bf509d1e6db0d9d78736116e92e82a";
|
|
hash = "sha256-UlrSp/n3og0GAQXzISsB24OfK3qOUPE7jYOkEbZ2neI=";
|
|
};
|
|
|
|
cargoHash = "sha256-etqW3xcxkiNfkiPxl/Emt5pQCkNnoIhHFkX0Zqfs4rc=";
|
|
|
|
nativeCheckInputs = [ cacert ];
|
|
|
|
# The test suite builds `reqwest::Client`s, and rustls rejects construction
|
|
# outright when no system trust store is found ("No CA certificates were
|
|
# loaded from the system"). The sandbox has no /etc/ssl, so point the tests
|
|
# at nixpkgs' bundle. Build-time only; the installed binary still uses the
|
|
# host's trust store at runtime.
|
|
preCheck = ''
|
|
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
|
|
'';
|
|
|
|
# Serialise the test harness. The lib suite shares process-global worker
|
|
# registries and steer/abort buses (src/orchestrator/workers.rs,
|
|
# src/orchestrator/bus.rs, src/orchestrator/preemption.rs), so the
|
|
# manager-loop tests fail nondeterministically when the harness runs them on
|
|
# parallel threads: rebuilding one unchanged derivation yielded 3 failures,
|
|
# then 1 failure, then 0 with serial threads. All 325 tests still run — none
|
|
# are skipped or filtered. Drop this flag once upstream makes that state
|
|
# per-instance.
|
|
cargoTestFlags = [
|
|
"--"
|
|
"--test-threads=1"
|
|
];
|
|
|
|
# Role prompts are embedded with `include_str!`, so the binary needs no
|
|
# runtime data files. The annotated example configs are the de-facto
|
|
# first-run documentation, since a backend URL and model are mandatory.
|
|
postInstall = ''
|
|
install -Dm644 marmel.toml.example $out/share/doc/${pname}/examples/marmel.toml.example
|
|
install -Dm644 marmel.toml.cloud $out/share/doc/${pname}/examples/marmel.toml.cloud
|
|
'';
|
|
|
|
passthru = {
|
|
category = "AI Coding Agents";
|
|
updateScript = [
|
|
"nix-update"
|
|
"--flake"
|
|
".#marmel"
|
|
"--version=branch=main"
|
|
];
|
|
};
|
|
|
|
meta = {
|
|
description = "Autonomous agentic coding assistant with Manager + specialist subagent orchestration over any OpenAI-compatible LLM backend";
|
|
homepage = "https://github.com/Na1w/marmel";
|
|
# Upstream README states MIT, but the repository ships no LICENSE file and
|
|
# Cargo.toml has no license field.
|
|
license = lib.licenses.mit;
|
|
sourceProvenance = with lib.sourceTypes; [ fromSource ];
|
|
mainProgram = "marmel";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|