mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
1be3d412c0
`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.
35 lines
830 B
Nix
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 ];
|
|
};
|
|
}
|