depot/third_party/nixpkgs/pkgs/tools/security/vault-ssh-plus/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

48 lines
1.1 KiB
Nix

{ buildGoModule
, fetchFromGitHub
, makeWrapper
, lib
, openssh
, testers
, vault-ssh-plus
}:
buildGoModule rec {
pname = "vault-ssh-plus";
version = "0.7.3";
src = fetchFromGitHub {
owner = "isometry";
repo = pname;
rev = "v${version}";
hash = "sha256-IRmFC5WsLmHfPjS/jW5V7dNF5rNvmsh3YKwW7rGII24=";
};
vendorHash = "sha256-cuU7rEpJrwrbiXLajdv4h6GePbpZclweyB9qZ3SIjP0=";
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)";
license = licenses.mit;
maintainers = with maintainers; [ lesuisse ];
};
}