teleport: 5.2.1 -> 6.1.2

This commit is contained in:
Justinas Stankevicius 2021-04-22 18:32:55 +03:00
parent cd0ffd3f5f
commit 8e2d3f941e

View file

@ -1,27 +1,27 @@
# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev
{ lib, buildGoPackage, zip, fetchFromGitHub, makeWrapper, xdg-utils }:
{ lib, buildGoModule, zip, fetchFromGitHub, makeWrapper, xdg-utils }:
let
webassets = fetchFromGitHub {
owner = "gravitational";
repo = "webassets";
rev = "8ace0cfcc6867651bed3fd5b5f35aaa2a80e1106";
sha256 = "sha256-mzvYysCFMvWHo8Y4cmhAju62jjpe92j564gc12BSdZA=";
rev = "cf396f868aebb8ba654ea2398c25f033181e7114";
sha256 = "sha256-12jkpWl/kL0ttRHtxyDnKjYAZNrheEGQF8HEGSXvvAk=";
};
in
buildGoPackage rec {
buildGoModule rec {
pname = "teleport";
version = "5.2.1";
version = "6.1.2";
# This repo has a private submodule "e" which fetchgit cannot handle without failing.
src = fetchFromGitHub {
owner = "gravitational";
repo = "teleport";
rev = "v${version}";
sha256 = "sha256-8WEVH+04y1/s9KpBlK/LrgHG7qTpu2LqtanKKdi9N08=";
sha256 = "sha256-4ZaebTTgGrGRQbMfDw1PL/qtDKmHbSY6kPmWyFeIcAU=";
};
goPackagePath = "github.com/gravitational/teleport";
vendorSha256 = null;
subPackages = [ "tool/tctl" "tool/teleport" "tool/tsh" ];
@ -29,7 +29,6 @@ buildGoPackage rec {
postBuild = ''
pushd .
cd $NIX_BUILD_TOP/go/src/github.com/gravitational/teleport
mkdir -p build
echo "making webassets"
cp -r ${webassets}/* webassets/
@ -41,13 +40,21 @@ buildGoPackage rec {
popd
'';
# 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)
'';
postInstall = ''
install -Dm755 -t $client/bin $out/bin/tsh
wrapProgram $client/bin/tsh --prefix PATH : ${xdg-utils}/bin
wrapProgram $out/bin/tsh --prefix PATH : ${xdg-utils}/bin
'';
@ -62,7 +69,7 @@ buildGoPackage rec {
meta = with lib; {
description = "A SSH CA management suite";
homepage = "https://gravitational.com/teleport/";
homepage = "https://goteleport.com/";
license = licenses.asl20;
maintainers = with maintainers; [ sigma tomberek freezeboy ];
platforms = platforms.unix;