at 24.11-pre 45 lines 1.2 kB view raw
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5, nixosTests 6}: 7 8buildGoModule rec { 9 pname = "upterm"; 10 version = "0.14.3"; 11 12 src = fetchFromGitHub { 13 owner = "owenthereal"; 14 repo = "upterm"; 15 rev = "v${version}"; 16 hash = "sha256-koZRKxp6Q52jvpmQqQAGvPHoiiU2LaEuNeRY/rru+XM="; 17 }; 18 19 vendorHash = "sha256-PUcfE7LQQh2ftiOiOoucSfxYnTI4zRNmmSqqmvvvs7g="; 20 21 subPackages = [ "cmd/upterm" "cmd/uptermd" ]; 22 23 nativeBuildInputs = [ installShellFiles ]; 24 25 postInstall = '' 26 # force go to build for build arch rather than host arch during cross-compiling 27 CGO_ENABLED=0 GOOS= GOARCH= go run cmd/gendoc/main.go 28 installManPage etc/man/man*/* 29 installShellCompletion --bash --name upterm.bash etc/completion/upterm.bash_completion.sh 30 installShellCompletion --zsh --name _upterm etc/completion/upterm.zsh_completion 31 ''; 32 33 doCheck = true; 34 35 passthru.tests = { inherit (nixosTests) uptermd; }; 36 37 __darwinAllowLocalNetworking = true; 38 39 meta = with lib; { 40 description = "Secure terminal-session sharing"; 41 homepage = "https://upterm.dev"; 42 license = licenses.asl20; 43 maintainers = with maintainers; [ hax404 ]; 44 }; 45}