2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 01:33:10 +00:00
nixpkgs/pkgs/by-name/cr/crossplane-cli/package.nix
2024-09-21 08:59:49 +00:00

51 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, nix-update-script
, testers
, crossplane-cli
}:
buildGoModule rec {
pname = "crossplane-cli";
version = "1.17.1";
src = fetchFromGitHub {
owner = "crossplane";
repo = "crossplane";
rev = "v${version}";
hash = "sha256-zcORVw+6QUucxJkHx/QWOHn50fd4+Jp+ZtiGuwfEQ6I=";
};
vendorHash = "sha256-de9xt3aFmGDddwMO2GgKKKmSfvsfnpit3wUrBme//fI=";
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 || true";
version = "v${version}";
};
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 ];
};
}