2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-02-21 19:44:09 +00:00
nixpkgs/pkgs/applications/networking/cluster/helm/plugins/helm-s3.nix
Changsheng Wu dccc2eb688
kubernetes-helmPlugins.helm-s3: 0.10.0 -> 0.14.0 ()
kubernetes-helmPlugins.helm-s3: 0.10.0 -> 0.14.0

Update the checkPhase to skip the e2e tests as before (see the test-unit make
target), but also the awsutil tests, since they require an internet connection.

Co-authored-by: Eric Bailey <yurrriq@users.noreply.github.com>
2023-07-11 15:56:14 -05:00

43 lines
1.0 KiB
Nix

{ buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "helm-s3";
version = "0.14.0";
src = fetchFromGitHub {
owner = "hypnoglow";
repo = pname;
rev = "v${version}";
sha256 = "sha256-81Rzqu2fj6xSZbKvAhHzaGnr/3ACZvqJhYe+6Vyc0qk=";
};
vendorSha256 = "sha256-Jvfl0sdZXV497RIgoZUJD0zK/pXK6yeAnuSdq42nky8=";
# NOTE: Remove the install and upgrade hooks.
postPatch = ''
sed -i '/^hooks:/,+2 d' plugin.yaml
'';
# NOTE: make test-unit, but skip awsutil, which needs internet access
checkPhase = ''
go test $(go list ./... | grep -vE '(awsutil|e2e)')
'';
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
subPackages = [ "cmd/helm-s3" ];
postInstall = ''
install -dm755 $out/${pname}
mv $out/bin $out/${pname}/
install -m644 -Dt $out/${pname} plugin.yaml
'';
meta = with lib; {
description = "A Helm plugin that shows a diff";
homepage = "https://github.com/hypnoglow/helm-s3";
license = licenses.mit;
maintainers = with maintainers; [ yurrriq ];
};
}