nixpkgs/pkgs/by-name/cr/crossplane-cli/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.1 KiB
Nix
Raw Normal View History

2023-11-04 12:26:51 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, nix-update-script
, testers
, crossplane-cli
2023-11-04 12:26:51 +00:00
}:
buildGoModule rec {
pname = "crossplane-cli";
2024-03-16 07:59:40 +00:00
version = "1.15.1";
2023-11-04 12:26:51 +00:00
src = fetchFromGitHub {
owner = "crossplane";
repo = "crossplane";
rev = "v${version}";
2024-03-16 07:59:40 +00:00
hash = "sha256-MuPJjVM8Nxm9PLTE3+7KGwmvXJTLfNj5RCh+/kHR0GM=";
2023-11-04 12:26:51 +00:00
};
2024-02-17 22:22:18 +00:00
vendorHash = "sha256-+e3NuSCvUgZANDB9LsvlQn3h9+L1NeQeURKDZd21reo=";
2023-11-04 12:26:51 +00:00
ldflags = [
"-s"
"-w"
"-X github.com/crossplane/crossplane/internal/version.version=v${version}"
];
subPackages = [ "cmd/crank" ];
postInstall = ''
mv $out/bin/crank $out/bin/crossplane
'';
passthru.tests.version = testers.testVersion {
package = crossplane-cli;
command = "crossplane --version";
version = "v${version}";
};
2023-11-04 12:26:51 +00:00
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://www.crossplane.io/";
changelog = "https://github.com/crossplane/crossplane/releases/tag/v${version}";
description = "Utility to make using Crossplane easier";
mainProgram = "crossplane";
license = licenses.asl20;
maintainers = with maintainers; [ selfuryon ];
};
}