Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / operator-sdk / default.nix
blob3ba63d8440b3c85a4e7a08eafc873b208c249f83
1 { lib
2 , buildGoModule
3 , go
4 , fetchFromGitHub
5 , makeWrapper
6 }:
8 buildGoModule rec {
9   pname = "operator-sdk";
10   version = "1.31.0";
12   src = fetchFromGitHub {
13     owner = "operator-framework";
14     repo = pname;
15     rev = "refs/tags/v${version}";
16     hash = "sha256-v/7nqZg/lwiK2k92kQWSZCSjEZhTAQHCGBcTfxQX2r0=";
17   };
19   vendorHash = "sha256-geKWTsDLx5drTleTnneg2JIbe5sMS5JUQxTX9Bcm+IQ=";
21   nativeBuildInputs = [
22     makeWrapper
23   ];
25   buildInputs = [
26     go
27   ];
29   doCheck = false;
31   subPackages = [
32     "cmd/ansible-operator"
33     "cmd/helm-operator"
34     "cmd/operator-sdk"
35   ];
37   # operator-sdk uses the go compiler at runtime
38   allowGoReference = true;
40   postFixup = ''
41     wrapProgram $out/bin/operator-sdk --prefix PATH : ${lib.makeBinPath [ go ]}
42   '';
44   meta = with lib; {
45     description = "SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding";
46     homepage = "https://github.com/operator-framework/operator-sdk";
47     changelog = "https://github.com/operator-framework/operator-sdk/releases/tag/v${version}";
48     license = licenses.asl20;
49     maintainers = with maintainers; [ arnarg ];
50     platforms = platforms.linux ++ platforms.darwin;
51   };