|
|
|
@ -4,26 +4,26 @@ let |
|
|
|
|
webassets = fetchFromGitHub { |
|
|
|
|
owner = "gravitational"; |
|
|
|
|
repo = "webassets"; |
|
|
|
|
rev = "c63397375632f1a4323918dde78334472f3ffbb9"; |
|
|
|
|
sha256 = "sha256-6YKk0G3s+35PRsUBkKgu/tNoSSwjJ5bTn8DACF4gYr4="; |
|
|
|
|
rev = "2891baa0de7283f61c08ff2fa4494e53f9d4afc1"; |
|
|
|
|
sha256 = "sha256-AvhCOLa+mgty9METlOCARlUOEDMAW6Kk1esSmBbVcok="; |
|
|
|
|
}; |
|
|
|
|
in |
|
|
|
|
|
|
|
|
|
buildGoModule rec { |
|
|
|
|
pname = "teleport"; |
|
|
|
|
version = "6.2.8"; |
|
|
|
|
version = "7.0.0"; |
|
|
|
|
|
|
|
|
|
# This repo has a private submodule "e" which fetchgit cannot handle without failing. |
|
|
|
|
src = fetchFromGitHub { |
|
|
|
|
owner = "gravitational"; |
|
|
|
|
repo = "teleport"; |
|
|
|
|
rev = "v${version}"; |
|
|
|
|
sha256 = "sha256-TVjdz97CUXBKCQh9bYrvtcH4StblBMsXiQ9Gix/NIm4="; |
|
|
|
|
sha256 = "sha256-2GQ3IP5jfT6vSni5hfDex09wXrnUmTpcvH2S6zc399I="; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
vendorSha256 = null; |
|
|
|
|
|
|
|
|
|
subPackages = [ "tool/tctl" "tool/teleport" "tool/tsh" ]; |
|
|
|
|
tags = [ "webassets_embed" ]; |
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ zip makeWrapper ]; |
|
|
|
|
|
|
|
|
@ -34,27 +34,16 @@ buildGoModule rec { |
|
|
|
|
./test.patch |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
postBuild = '' |
|
|
|
|
pushd . |
|
|
|
|
# Reduce closure size for client machines |
|
|
|
|
outputs = [ "out" "client" ]; |
|
|
|
|
|
|
|
|
|
preBuild = '' |
|
|
|
|
mkdir -p build |
|
|
|
|
echo "making webassets" |
|
|
|
|
cp -r ${webassets}/* webassets/ |
|
|
|
|
make build/webassets.zip |
|
|
|
|
cat build/webassets.zip >> $NIX_BUILD_TOP/go/bin/teleport |
|
|
|
|
rm -fr build/webassets.zip |
|
|
|
|
cd $NIX_BUILD_TOP/go/bin |
|
|
|
|
zip -q -A teleport |
|
|
|
|
popd |
|
|
|
|
make lib/web/build/webassets.zip |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
# Do not strip the embedded web assets |
|
|
|
|
dontStrip = true; |
|
|
|
|
|
|
|
|
|
# Reduce closure size for client machines |
|
|
|
|
outputs = [ "out" "client" ]; |
|
|
|
|
|
|
|
|
|
buildTargets = [ "full" ]; |
|
|
|
|
|
|
|
|
|
preCheck = '' |
|
|
|
|
export HOME=$(mktemp -d) |
|
|
|
|
''; |
|
|
|
|