upterm: fix cross compiling

This commit is contained in:
Jörg Thalheim 2022-07-25 07:41:14 +02:00
parent c077336910
commit 939efa9524

View File

@ -18,11 +18,13 @@ buildGoModule rec {
vendorSha256 = null;
subPackages = [ "cmd/upterm" "cmd/uptermd" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
$out/bin/gendoc
rm $out/bin/gendoc
# 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