Files
nixpkgs/pkgs/by-name/bo/bosh-cli/package.nix
2026-07-31 14:45:23 +00:00

46 lines
1020 B
Nix

{
lib,
fetchFromGitHub,
buildGoModule,
makeWrapper,
openssh,
}:
buildGoModule (finalAttrs: {
pname = "bosh-cli";
version = "7.10.8";
src = fetchFromGitHub {
owner = "cloudfoundry";
repo = "bosh-cli";
rev = "v${finalAttrs.version}";
sha256 = "sha256-MNXmSjkUNFWh0OQNefHAQEeD3TzoLJdLW/1WM9sxJK4=";
};
vendorHash = null;
postPatch = ''
substituteInPlace cmd/version.go --replace '[DEV BUILD]' '${finalAttrs.version}'
'';
nativeBuildInputs = [ makeWrapper ];
subPackages = [ "." ];
doCheck = false;
postInstall = ''
mv $out/bin/bosh-cli $out/bin/bosh
wrapProgram $out/bin/bosh --prefix PATH : '${lib.makeBinPath [ openssh ]}'
'';
meta = {
description = "Command line interface to CloudFoundry BOSH";
homepage = "https://bosh.io";
changelog = "https://github.com/cloudfoundry/bosh-cli/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ris ];
mainProgram = "bosh";
};
})