<commit_before>{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, gnupg1compat, bzip2, xz, graphviz }:

buildGoPackage rec {
  name = "aptly-${version}";
  version = "0.9.7";
  rev = "v${version}";

  src = fetchFromGitHub {
    inherit rev;
    owner = "smira";
    repo = "aptly";
    sha256 = "0j1bmqdah4i83r2cf8zcq87aif1qg90yasgf82yygk3hj0gw1h00";
  };

  goPackagePath = "github.com/smira/aptly";
  goDeps = ./deps.nix;

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    rm $bin/bin/man
    wrapProgram "$bin/bin/aptly" \
      --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg1compat bzip2 xz graphviz ]}"
  '';

  meta = with stdenv.lib; {
    homepage = https://www.aptly.info;
    description = "Debian repository management tool";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = [ maintainers.montag451 ];
  };
}
<commit_msg>aptly: add bash completion<commit_after>{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, gnupg1compat, bzip2, xz, graphviz }:

let

  version = "0.9.7";
  rev = "v${version}";

  aptlySrc = fetchFromGitHub {
    inherit rev;
    owner = "smira";
    repo = "aptly";
    sha256 = "0j1bmqdah4i83r2cf8zcq87aif1qg90yasgf82yygk3hj0gw1h00";
  };

  aptlyCompletionSrc = fetchFromGitHub {
    rev = version;
    owner = "aptly-dev";
    repo = "aptly-bash-completion";
    sha256 = "1yz3pr2jfczqv81as2q3cizwywj5ksw76vi15xlbx5njkjp4rbm4";
  };

in

buildGoPackage {
  name = "aptly-${version}";

  src = aptlySrc;

  goPackagePath = "github.com/smira/aptly";
  goDeps = ./deps.nix;

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    rm $bin/bin/man
    mkdir -p $bin/share/bash-completion/completions
    ln -s ${aptlyCompletionSrc}/aptly $bin/share/bash-completion/completions
    wrapProgram "$bin/bin/aptly" \
      --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg1compat bzip2 xz graphviz ]}"
  '';

  meta = with stdenv.lib; {
    homepage = https://www.aptly.info;
    description = "Debian repository management tool";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = [ maintainers.montag451 ];
  };
}

{'fraction_non_alphanumeric': 0.13644859813084112, 'fraction_numerical': 0.038317757009345796, 'mean_word_length': 3.432712215320911, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5375169', 'n_tokens_mistral': 886, 'n_tokens_neox': 824, 'n_words': 145}