mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 21:43:32 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
67 lines
1.6 KiB
Nix
67 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "driftctl";
|
|
version = "0.40.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "snyk";
|
|
repo = "driftctl";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-IDKfW0NCEsgKXpHA7SwkHjMeoGAIYITlDVR/vI/b9hk=";
|
|
};
|
|
|
|
vendorHash = "sha256-JFvC9PReziktHSXbltGkGHjVR8hTM1hPJ0OqrZQXRQM=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/snyk/driftctl/pkg/version.version=v${version}"
|
|
"-X github.com/snyk/driftctl/build.env=release"
|
|
"-X github.com/snyk/driftctl/build.enableUsageReporting=false"
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd driftctl \
|
|
--bash <($out/bin/driftctl completion bash) \
|
|
--fish <($out/bin/driftctl completion fish) \
|
|
--zsh <($out/bin/driftctl completion zsh)
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/driftctl --help
|
|
$out/bin/driftctl version | grep "v${version}"
|
|
# check there's no telemetry flag
|
|
$out/bin/driftctl --help | grep -vz "telemetry"
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://driftctl.com/";
|
|
changelog = "https://github.com/snyk/driftctl/releases/tag/v${version}";
|
|
description = "Detect, track and alert on infrastructure drift";
|
|
mainProgram = "driftctl";
|
|
longDescription = ''
|
|
driftctl is a free and open-source CLI that warns of infrastructure drift
|
|
and fills in the missing piece in your DevSecOps toolbox.
|
|
'';
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [
|
|
kaction
|
|
jk
|
|
qjoly
|
|
];
|
|
};
|
|
}
|