{ lib, rustPlatform, fetchFromGitHub, }: # furrow is the copy-on-write workspace snapper codeaf drives. codeaf ships a # copy of it inside the go binary: the release asset from GitHub, glibc-dynamic # and untouched by anything in this build, so the file codeaf writes out to # ~/.codeaf/bin/furrow- cannot start here — NixOS answers "Could not # start dynamically linked executable" and names stub-ld. Building furrow here # instead gives the same version as an ordinary Nix binary, and codeaf is told # to use it through CODEAF_FURROW, which internal/furrow reads before it ever # looks at the embedded copy. See ./package.nix. # # The version here has to be the one codeaf pinned in # internal/furrowbin/pin.json: the decoders in codeaf were written for that # furrow. Bump the two together. rustPlatform.buildRustPackage rec { pname = "furrow"; version = "0.1.0"; src = fetchFromGitHub { owner = "Agent-Field"; repo = "furrow"; rev = "v${version}"; hash = "sha256-xknfvnBDFxDYeBE1yAjXl1Fx3VDHrNSUhXEWQO3PK6s="; }; cargoHash = "sha256-FGtrKtWFPcT3R8nF5OQFlmIiKSuZ8aiHfj76bBvga5A="; # Only the unit tests run here. Every cli integration test builds a fixture # whose first step is `xattr::set(…, "user.furrow-test", …)`, and the sandbox # /tmp is a tmpfs that answers EOPNOTSUPP for user.* xattrs, so all 54 of them # die in setup — same reason forks_files_links_modes_and_xattrs is skipped, in # the one lib test that touches an xattr. Upstream's CI runs the whole suite on # a filesystem that supports them. cargoTestFlags = [ "--lib" ]; checkFlags = [ "--skip" "forks_files_links_modes_and_xattrs" ]; meta = with lib; { description = "Local-first working-state snapshots for agentic development"; homepage = "https://github.com/Agent-Field/furrow"; changelog = "https://github.com/Agent-Field/furrow/releases/tag/v${version}"; license = licenses.asl20; # Thirteen source files use std::os::unix with no windows guards, so the # upstream release has no windows asset either. platforms = platforms.unix; mainProgram = "furrow"; }; }