1 { lib, fetchFromGitHub, buildGoModule, installShellFiles }:
7 src = fetchFromGitHub {
11 hash = "sha256-N54wkqe05Hm9o+kQmWTJREoU+0GnivaVTJngtBDL8+U=";
12 # populate values that require us to use git. By doing this in postFetch we
13 # can delete .git afterwards and maintain better reproducibility of the src.
17 git rev-parse HEAD > $out/COMMIT
18 find "$out" -name .git -print0 | xargs -0 rm -rf
22 vendorHash = "sha256-R4KsR00VAq0fUxHM48212GWy8KJoIOM0R8ycVjjjMO4=";
24 nativeBuildInputs = [ installShellFiles ];
29 "-X github.com/cirruslabs/orchard/internal/version.Version=${version}"
32 # ldflags based on metadata from git and source
34 ldflags+=" -X github.com/cirruslabs/orchard/internal/version.Commit=$(cat COMMIT)"
37 subPackages = [ "cmd/orchard" ];
40 export HOME="$(mktemp -d)"
41 installShellCompletion --cmd orchard \
42 --bash <($out/bin/orchard completion bash) \
43 --zsh <($out/bin/orchard completion zsh) \
44 --fish <($out/bin/orchard completion fish)
48 mainProgram = "orchard";
50 "Orchestrator for running Tart Virtual Machines on a cluster of Apple Silicon devices";
51 homepage = "https://github.com/cirruslabs/orchard";
52 license = licenses.fairsource09;
53 maintainers = with maintainers; [ techknowlogick ];