nixpkgs/pkgs/development/tools/operator-sdk/default.nix
2022-12-20 15:55:21 +08:00

51 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, go
, fetchFromGitHub
, makeWrapper
}:
buildGoModule rec {
pname = "operator-sdk";
version = "1.26.0";
src = fetchFromGitHub {
owner = "operator-framework";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-hIJTdTZ24+VwF1M/RvKcnQRzZga0nsjlTTUFYxZn0lo=";
};
vendorHash = "sha256-1Vz+SIrNULajDqzZt53+o9wv1zLPBvKrO28BTqS4VbM=";
nativeBuildInputs = [
makeWrapper
];
buildInputs = [
go
];
doCheck = false;
subPackages = [
"cmd/operator-sdk"
];
# operator-sdk uses the go compiler at runtime
allowGoReference = true;
postFixup = ''
wrapProgram $out/bin/operator-sdk --prefix PATH : ${lib.makeBinPath [ go ]}
'';
meta = with lib; {
description = "SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding";
homepage = "https://github.com/operator-framework/operator-sdk";
changelog = "https://github.com/operator-framework/operator-sdk/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ arnarg ];
platforms = platforms.linux ++ platforms.darwin;
};
}