Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 45 lines 1.1 kB view raw
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5, nixosTests 6}: 7 8buildGoModule rec { 9 pname = "upterm"; 10 version = "0.10.0"; 11 12 src = fetchFromGitHub { 13 owner = "owenthereal"; 14 repo = "upterm"; 15 rev = "v${version}"; 16 hash = "sha256-wjbptcGy3wOZPm/11El7Xqz6NrR8G19V9zfU5pKFGuk="; 17 }; 18 19 vendorSha256 = null; 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}