<commit_before>{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
  pname = "kube3d";
  version = "3.0.2";
  k3sVersion = "1.18.6-k3s1";

  excludedPackages = ''tools'';

  src = fetchFromGitHub {
    owner  = "rancher";
    repo   = "k3d";
    rev    = "v${version}";
    sha256 = "182n4kggwr6z75vsagfd0rl89ixcw5h13whf56jh4cd38dj8is5l";
  };

  buildFlagsArray = ''
    -ldflags=
      -w -s
      -X github.com/rancher/k3d/v3/version.Version=v${version}
      -X github.com/rancher/k3d/v3/version.K3sVersion=v${k3sVersion}
  '';

  nativeBuildInputs = [ installShellFiles ];
  postInstall = ''
   for shell in bash zsh; do
     $out/bin/k3d completion $shell > k3d.$shell
     installShellCompletion k3d.$shell
   done
  '';

  vendorSha256 = null;

  doCheck = false;

  meta = with stdenv.lib; {
    homepage = "https://github.com/rancher/k3d";
    description = "A helper to run k3s (Lightweight Kubernetes. 5 less than k8s) in a docker container";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = with maintainers; [ <NAME> ngerstle ];
  };
}
<commit_msg>kube3d: add completion for fish<commit_after>{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
  pname = "kube3d";
  version = "3.0.2";
  k3sVersion = "1.18.6-k3s1";

  excludedPackages = ''tools'';

  src = fetchFromGitHub {
    owner  = "rancher";
    repo   = "k3d";
    rev    = "v${version}";
    sha256 = "182n4kggwr6z75vsagfd0rl89ixcw5h13whf56jh4cd38dj8is5l";
  };

  buildFlagsArray = ''
    -ldflags=
      -w -s
      -X github.com/rancher/k3d/v3/version.Version=v${version}
      -X github.com/rancher/k3d/v3/version.K3sVersion=v${k3sVersion}
  '';

  nativeBuildInputs = [ installShellFiles ];

  # TODO: Move to enhanced installShellCompletion when in master: PR #83630
  postInstall = ''
    $out/bin/k3d completion bash > k3d.bash
    $out/bin/k3d completion fish > k3d.fish
    $out/bin/k3d completion zsh  > _k3d
    installShellCompletion k3d.{bash,fish} --zsh _k3d
  '';

  vendorSha256 = null;

  doCheck = false;

  meta = with stdenv.lib; {
    homepage = "https://github.com/rancher/k3d";
    description = "A helper to run k3s (Lightweight Kubernetes. 5 less than k8s) in a docker container";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = with maintainers; [ k<NAME> ngerstle ];
  };
}

{'fraction_non_alphanumeric': 0.13036234902124114, 'fraction_numerical': 0.0470637234485631, 'mean_word_length': 3.170138888888889, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '412770', 'n_tokens_mistral': 983, 'n_tokens_neox': 929, 'n_words': 183}