2021-02-07 20:21:13 +00:00
|
|
|
{ lib
|
2022-06-29 21:13:54 +00:00
|
|
|
, buildGoModule
|
2021-02-07 20:21:13 +00:00
|
|
|
, fetchFromGitHub
|
2022-02-22 23:32:00 +00:00
|
|
|
, installShellFiles
|
2022-03-17 16:57:23 +00:00
|
|
|
, nixosTests
|
2022-02-22 23:32:00 +00:00
|
|
|
}:
|
2021-02-07 20:21:13 +00:00
|
|
|
|
2022-06-29 21:13:54 +00:00
|
|
|
buildGoModule rec {
|
2021-02-07 20:21:13 +00:00
|
|
|
pname = "upterm";
|
2022-12-07 07:15:58 +00:00
|
|
|
version = "0.10.0";
|
2021-02-07 20:21:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "owenthereal";
|
|
|
|
repo = "upterm";
|
|
|
|
rev = "v${version}";
|
2022-12-07 07:15:58 +00:00
|
|
|
hash = "sha256-wjbptcGy3wOZPm/11El7Xqz6NrR8G19V9zfU5pKFGuk=";
|
2021-02-07 20:21:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
2022-07-25 05:41:14 +00:00
|
|
|
subPackages = [ "cmd/upterm" "cmd/uptermd" ];
|
|
|
|
|
2021-02-07 20:21:13 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-07-25 05:41:14 +00:00
|
|
|
# force go to build for build arch rather than host arch during cross-compiling
|
|
|
|
CGO_ENABLED=0 GOOS= GOARCH= go run cmd/gendoc/main.go
|
2021-02-07 20:21:13 +00:00
|
|
|
installManPage etc/man/man*/*
|
|
|
|
installShellCompletion --bash --name upterm.bash etc/completion/upterm.bash_completion.sh
|
|
|
|
installShellCompletion --zsh --name _upterm etc/completion/upterm.zsh_completion
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2022-03-17 16:57:23 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) uptermd; };
|
|
|
|
|
2021-02-07 20:21:13 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Secure terminal-session sharing";
|
|
|
|
homepage = "https://upterm.dev";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hax404 ];
|
|
|
|
};
|
|
|
|
}
|