1 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
7 src = fetchFromGitHub {
11 sha256 = "sha256-IDKfW0NCEsgKXpHA7SwkHjMeoGAIYITlDVR/vI/b9hk=";
14 vendorHash = "sha256-JFvC9PReziktHSXbltGkGHjVR8hTM1hPJ0OqrZQXRQM=";
16 nativeBuildInputs = [ installShellFiles ];
21 "-X github.com/snyk/driftctl/pkg/version.version=v${version}"
22 "-X github.com/snyk/driftctl/build.env=release"
23 "-X github.com/snyk/driftctl/build.enableUsageReporting=false"
27 installShellCompletion --cmd driftctl \
28 --bash <($out/bin/driftctl completion bash) \
29 --fish <($out/bin/driftctl completion fish) \
30 --zsh <($out/bin/driftctl completion zsh)
33 doInstallCheck = true;
34 installCheckPhase = ''
35 runHook preInstallCheck
37 $out/bin/driftctl --help
38 $out/bin/driftctl version | grep "v${version}"
39 # check there's no telemetry flag
40 $out/bin/driftctl --help | grep -vz "telemetry"
42 runHook postInstallCheck
46 homepage = "https://driftctl.com/";
47 changelog = "https://github.com/snyk/driftctl/releases/tag/v${version}";
48 description = "Detect, track and alert on infrastructure drift";
49 mainProgram = "driftctl";
51 driftctl is a free and open-source CLI that warns of infrastructure drift
52 and fills in the missing piece in your DevSecOps toolbox.
54 license = licenses.asl20;
55 maintainers = with maintainers; [ kaction jk qjoly ];