depot/third_party/nixpkgs/pkgs/tools/security/vault-ssh-plus/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

49 lines
1.1 KiB
Nix

{ buildGoModule
, fetchFromGitHub
, makeWrapper
, lib
, openssh
, testers
, vault-ssh-plus
}:
buildGoModule rec {
pname = "vault-ssh-plus";
version = "0.7.4";
src = fetchFromGitHub {
owner = "isometry";
repo = pname;
rev = "v${version}";
hash = "sha256-djS50SBR8HTyEd5Ya2I9w5irBrLTqzekEi5ASmkl6yk=";
};
vendorHash = "sha256-NndIBvW1/EZJ2KwP6HZ6wvhrgtmhTe97l3VxprtWq30=";
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
postInstall = ''
mv $out/bin/vault-ssh-plus $out/bin/vssh
wrapProgram $out/bin/vssh --prefix PATH : ${lib.makeBinPath [ openssh ]};
'';
passthru.tests.version = testers.testVersion {
package = vault-ssh-plus;
command = "vssh --version";
version = "v${version}";
};
meta = with lib; {
homepage = "https://github.com/isometry/vault-ssh-plus";
changelog = "https://github.com/isometry/vault-ssh-plus/releases/tag/v${version}";
description = "Automatically use HashiCorp Vault SSH Client Key Signing with ssh(1)";
mainProgram = "vssh";
license = licenses.mit;
maintainers = with maintainers; [ lesuisse ];
};
}