14 src = fetchFromGitHub {
18 hash = "sha256-uNJzJpeJpDNDgnBIzveK2dKVdRpEWFW912c/vZgeXQo=";
21 vendorHash = "sha256-ylz8O/HW1rtOCI6/YzIT/byYmSdMkSrF0AX7nIzALTU=";
23 subPackages = [ "." ];
28 "-X github.com/superfly/flyctl/internal/buildinfo.buildDate=1970-01-01T00:00:00Z"
29 "-X github.com/superfly/flyctl/internal/buildinfo.buildVersion=${version}"
31 tags = [ "production" ];
33 nativeBuildInputs = [ installShellFiles ];
35 patches = [ ./disable-auto-update.patch ];
38 GOOS= GOARCH= CGO_ENABLED=0 go generate ./...
45 # We override checkPhase to be able to test ./... while using subPackages
48 # We do not set trimpath for tests, in case they reference test assets
49 export GOFLAGS=''${GOFLAGS//-trimpath/}
57 installShellCompletion --cmd flyctl \
58 --bash <($out/bin/flyctl completion bash) \
59 --fish <($out/bin/flyctl completion fish) \
60 --zsh <($out/bin/flyctl completion zsh)
61 ln -s $out/bin/flyctl $out/bin/fly
64 passthru.tests.version = testers.testVersion {
66 command = "HOME=$(mktemp -d) flyctl version";
67 version = "v${flyctl.version}";
71 description = "Command line tools for fly.io services";
72 downloadPage = "https://github.com/superfly/flyctl";
73 homepage = "https://fly.io/";
74 license = lib.licenses.asl20;
75 maintainers = with lib.maintainers; [
82 mainProgram = "flyctl";