<commit_before>{ lib
, buildGoModule
, fetchFromGitHub
, testers
, adrgen
}:

buildGoModule rec {
  pname = "adrgen";
  version = "0.4.0-beta";

  src = fetchFromGitHub {
    owner = "asiermarques";
    repo = "adrgen";
    rev = "v${version}";
    sha256 = "sha256-2ZE/orsfwL59Io09c4yfXt2enVmpSM/QHlUMgyd9RYQ=";
  };

  vendorSha256 = "sha256-aDtUD+KKKSE0TpSi4+6HXSBMqF/TROZZhT0ox3a8Idk=";

  passthru.tests.version = testers.testVersion {
    package = adrgen;
    command = "adrgen version";
    version = "v${version}";
  };

  meta = with lib; {
    homepage = "https://github.com/asiermarques/adrgen";
    description = "A command-line tool for generating and managing Architecture Decision Records";<commit_msg>adrgen: fix darwin build<commit_after>{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
, testers
, adrgen
}:

buildGoModule rec {
  pname = "adrgen";
  version = "0.4.0-beta";

  src = fetchFromGitHub {
    owner = "asiermarques";
    repo = "adrgen";
    rev = "v${version}";
    hash = "sha256-2ZE/orsfwL59Io09c4yfXt2enVmpSM/QHlUMgyd9RYQ=";
  };

  patches = [
    # https://github.com/asiermarques/adrgen/pull/14
    (fetchpatch {
      name = "update-x-sys-for-go-1.18-on-aarch64-darwin.patch";
      url = "https://github.com/asiermarques/adrgen/commit/485dc383106467d1029ee6d92c9bcbc3c2281626.patch";
      hash = "sha256-38ktHrRgW5ysQmafvFthNtkZ6nnM61z4yEA7wUGmWb4=";
    })
  ];

  vendorHash = "sha256-RXwwv3Q/kQ6FondpiUm5XZogAVK2aaVmKu4hfr+AnAM=";

  passthru.tests.version = testers.testVersion {
    package = adrgen;
    command = "adrgen version";
    version = "v${version}";
  };

  meta = with lib; {
    homepage = "https://github.com/asiermarques/adrgen";
    description = "A command-line tool for generating and managing Architecture Decision Records";
{'fraction_non_alphanumeric': 0.13537604456824512, 'fraction_numerical': 0.05459610027855153, 'mean_word_length': 3.713910761154856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '6593874', 'n_tokens_mistral': 785, 'n_tokens_neox': 721, 'n_words': 110}