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";
|
2024-05-21 16:01:08 +00:00
|
|
|
version = "0.14.3";
|
2021-02-07 20:21:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "owenthereal";
|
|
|
|
repo = "upterm";
|
|
|
|
rev = "v${version}";
|
2024-05-21 16:01:08 +00:00
|
|
|
hash = "sha256-koZRKxp6Q52jvpmQqQAGvPHoiiU2LaEuNeRY/rru+XM=";
|
2021-02-07 20:21:13 +00:00
|
|
|
};
|
|
|
|
|
2024-05-21 16:01:08 +00:00
|
|
|
vendorHash = "sha256-PUcfE7LQQh2ftiOiOoucSfxYnTI4zRNmmSqqmvvvs7g=";
|
2021-02-07 20:21:13 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|