From 8e2d3f941e2878e2c666de9c5b131ffb15ff2665 Mon Sep 17 00:00:00 2001 From: Justinas Stankevicius Date: Thu, 22 Apr 2021 18:32:55 +0300 Subject: [PATCH] teleport: 5.2.1 -> 6.1.2 --- pkgs/servers/teleport/default.nix | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/teleport/default.nix b/pkgs/servers/teleport/default.nix index 2350311b9db2..c9ace581c7e1 100644 --- a/pkgs/servers/teleport/default.nix +++ b/pkgs/servers/teleport/default.nix @@ -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;