2021-03-23 19:22:30 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, openssh
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "assh";
|
2022-01-07 04:07:37 +00:00
|
|
|
version = "2.12.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "advanced-ssh-config";
|
|
|
|
owner = "moul";
|
|
|
|
rev = "v${version}";
|
2022-01-07 04:07:37 +00:00
|
|
|
sha256 = "1r3fny4k1crpjasgsp09qf0p3l9vg8c0ddbb8jd6qnqnwwprqfxd";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
vendorSha256 = "14x7m900mxiwgbbxs56pdqsmx56c4qir5j4dz57bwr10rmh25fy4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X moul.io/assh/v2/pkg/version.Version=${version}"
|
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
wrapProgram "$out/bin/assh" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PATH : ${openssh}/bin
|
|
|
|
'';
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/assh --help > /dev/null
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Advanced SSH config - Regex, aliases, gateways, includes and dynamic hosts";
|
2020-07-18 16:06:22 +00:00
|
|
|
homepage = "https://github.com/moul/assh";
|
|
|
|
changelog = "https://github.com/moul/assh/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ zzamboni ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
};
|
|
|
|
}
|