nixpkgs/pkgs/applications/networking/cluster/helm/plugins/helm-diff.nix
Arnout Engelen 1be3d412c0
treewide: go: inherit platforms instead of using platforms.all
`buildGoModule` and `buildGoPackage` by default inherit the `platforms`
from go. That seems better than explicitly configuring `platforms.all`.

There are also many packages that specify 'linux + darwin' - this is
even suggested in the documentation. We might also want to update those,
but let's do the noncontroversial change first.
2021-04-26 08:59:56 +02:00

35 lines
830 B
Nix

{ buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "helm-diff";
version = "3.1.3";
src = fetchFromGitHub {
owner = "databus23";
repo = pname;
rev = "v${version}";
sha256 = "sha256-h26EOjKNrlcrs2DAYj0NmDRgNRKozjfw5DtxUgHNTa4=";
};
vendorSha256 = "sha256-+n/QBuZqtdgUkaBG7iqSuBfljn+AdEzDoIo5SI8ErQA=";
# NOTE: Remove the install and upgrade hooks.
postPatch = ''
sed -i '/^hooks:/,+2 d' plugin.yaml
'';
postInstall = ''
install -dm755 $out/${pname}
mv $out/bin $out/${pname}/
mv $out/${pname}/bin/{helm-,}diff
install -m644 -Dt $out/${pname} plugin.yaml
'';
meta = with lib; {
description = "A Helm plugin that shows a diff";
inherit (src.meta) homepage;
license = licenses.apsl20;
maintainers = with maintainers; [ yurrriq ];
};
}