<commit_before>{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, git
, go
}:

buildGoModule rec {
  pname = "kubebuilder";
  version = "3.1.0";

  src = fetchFromGitHub {
    owner = "kubernetes-sigs";
    repo = "kubebuilder";
    rev = "v${version}";
    sha256 = "0bl5ff2cplal6hg75800crhyviamk1ws85sq60h4zg21hzf21y68";
  };
  vendorSha256 = "0zxyd950ksjswja64rfri5v2yaalfg6qmq8215ildgrcavl9974n";

  subPackages = ["cmd" "pkg/..."];

  preBuild = ''
    export buildFlagsArray+=("-ldflags=-X main.kubeBuilderVersion=v${version} \
        -X main.goos=$GOOS \
        -X main.goarch=$GOARCH \
        -X main.gitCommit=v${version} \
        -X main.buildDate=v${version}")
  '';

  doCheck = true;

  postInstall = ''
    mv $out/bin/cmd $out/bin/kubebuilder
    wrapProgram $out/bin/kubebuilder \
      --prefix PATH : ${lib.makeBinPath [ go ]}
  '';<commit_msg>kubebuilder: only build the `cmd` package<commit_after>{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, git
, go
}:

buildGoModule rec {
  pname = "kubebuilder";
  version = "3.1.0";

  src = fetchFromGitHub {
    owner = "kubernetes-sigs";
    repo = "kubebuilder";
    rev = "v${version}";
    sha256 = "0bl5ff2cplal6hg75800crhyviamk1ws85sq60h4zg21hzf21y68";
  };
  vendorSha256 = "0zxyd950ksjswja64rfri5v2yaalfg6qmq8215ildgrcavl9974n";

  subPackages = ["cmd"];

  preBuild = ''
    export buildFlagsArray+=("-ldflags=-X main.kubeBuilderVersion=v${version} \
        -X main.goos=$GOOS \
        -X main.goarch=$GOARCH \
        -X main.gitCommit=v${version} \
        -X main.buildDate=v${version}")
  '';

  doCheck = true;

  postInstall = ''
    mv $out/bin/cmd $out/bin/kubebuilder
    wrapProgram $out/bin/kubebuilder \
      --prefix PATH : ${lib.makeBinPath [ go ]}
  '';
{'fraction_non_alphanumeric': 0.1494318181818182, 'fraction_numerical': 0.053409090909090906, 'mean_word_length': 3.182897862232779, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1691589', 'n_tokens_mistral': 757, 'n_tokens_neox': 711, 'n_words': 108}