mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 12:53:05 +00:00
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, nixosTests
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "upterm";
|
|
version = "0.10.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "owenthereal";
|
|
repo = "upterm";
|
|
rev = "v${version}";
|
|
hash = "sha256-wjbptcGy3wOZPm/11El7Xqz6NrR8G19V9zfU5pKFGuk=";
|
|
};
|
|
|
|
vendorSha256 = null;
|
|
|
|
subPackages = [ "cmd/upterm" "cmd/uptermd" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
# 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
|
|
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;
|
|
|
|
passthru.tests = { inherit (nixosTests) uptermd; };
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = with lib; {
|
|
description = "Secure terminal-session sharing";
|
|
homepage = "https://upterm.dev";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ hax404 ];
|
|
};
|
|
}
|