<commit_before>{ lib
, buildGo
, fetchFromGitHub
, zip
}:

let
  version = "4.0.2";
in
buildGo {
  name = "teleport-${version}";

  src = fetchFromGitHub {
    version = 6;
    owner = "gravitational";
    repo = "teleport";
    rev = "v${version}";
    sha256 = "95a8757d88d9067c5379c85eca4e34acf3d5305715d2e42ddf49f5a2b81efb1d";
  };

  srcRoot = null;

  nativeBuildInputs = [
    zip
  ];

  postUnpack = ''
    srcNew="$NIX_BUILD_TOP"/go/src/github.com/gravitational/teleport
    mkdir -p "$(dirname "$srcNew")"
    mv "$srcRoot" "$srcNew"
    srcRoot="$srcNew"
  '';

  installedSubmodules = [
    "tool/..."
  ];
  
  postFixup = ''
    pushd web/dist >/dev/null
    zip -r "$NIX_BUILD_TOP"/assets.zip .
    popd >/dev/null
    cat "$NIX_BUILD_TOP"/assets.zip >>"$out"/bin/teleport
    zip -A "$out"/bin/teleport
  '';
<commit_msg>teleport: 4.0.2 -> 4.0.4<commit_after>{ lib
, buildGo
, fetchFromGitHub
, zip
}:

let
  version = "4.0.4";
in
buildGo {
  name = "teleport-${version}";

  src = fetchFromGitHub {
    version = 6;
    owner = "gravitational";
    repo = "teleport";
    rev = "v${version}";
    sha256 = "80ebc9b5d8e84774a9636bcc17de7706f5c1ec1b97d97acc0739169c4037d360";
  };

  srcRoot = null;

  nativeBuildInputs = [
    zip
  ];

  postUnpack = ''
    srcNew="$NIX_BUILD_TOP"/go/src/github.com/gravitational/teleport
    mkdir -p "$(dirname "$srcNew")"
    mv "$srcRoot" "$srcNew"
    srcRoot="$srcNew"
  '';

  installedSubmodules = [
    "tool/..."
  ];
  
  postFixup = ''
    pushd web/dist >/dev/null
    zip -r "$NIX_BUILD_TOP"/assets.zip .
    popd >/dev/null
    cat "$NIX_BUILD_TOP"/assets.zip >>"$out"/bin/teleport
    zip -A "$out"/bin/teleport
  '';

{'fraction_non_alphanumeric': 0.16775340841730882, 'fraction_numerical': 0.05927682276229994, 'mean_word_length': 2.8804597701149426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7303272', 'n_tokens_mistral': 759, 'n_tokens_neox': 694, 'n_words': 112}