<commit_before>{ stdenv, fetchurl, fetchgit, znc }:

let
  zncDerivation = a@{
    name, src, module_name,
    buildPhase ? "${znc}/bin/znc-buildmod ${module_name}.cpp",
    installPhase ? "install -D ${module_name}.so $out/lib/znc/${module_name}.so", ...
  } : stdenv.mkDerivation (a // {
    inherit buildPhase;
    inherit installPhase;

    meta = a.meta // { platforms = stdenv.lib.platforms.unix; };
    passthru.module_name = module_name;
  });

in rec {

  fish = zncDerivation rec {
    name = "znc-fish-${version}";
    version = "git-2014-10-10";
    module_name = "fish";

    src = fetchgit {
      url = meta.repositories.git;
      rev = "9c580e018a1a08374e814fc06f551281cff827de";
      sha256 = "0yvs0jkwwp18qxqvw1dvir91ggczz56ka00k0zlsb81csdi8xfvl";
    };

    meta = {
      description = "ZNC FiSH module";
      homepage = https://github.com/dctrwatson/znc-fish;
      # this fork works with ZNC 1.6
      repositories.git = https://github.com/jarrydpage/znc-fish.git;
      maintainers = [ stdenv.lib.maintainers.offline ];
    };
  };

  privmsg = zncDerivation rec {<commit_msg>znc-clientbuffer: init at git-2015-08-27<commit_after>{ stdenv, fetchurl, fetchgit, znc }:

let
  zncDerivation = a@{
    name, src, module_name,
    buildPhase ? "${znc}/bin/znc-buildmod ${module_name}.cpp",
    installPhase ? "install -D ${module_name}.so $out/lib/znc/${module_name}.so", ...
  } : stdenv.mkDerivation (a // {
    inherit buildPhase;
    inherit installPhase;

    meta = a.meta // { platforms = stdenv.lib.platforms.unix; };
    passthru.module_name = module_name;
  });

in rec {

  clientbuffer = zncDerivation rec {
    name = "znc-clientbuffer-${version}";
    version = "git-2015-08-27";
    module_name = "clientbuffer";

    src = fetchgit {
      url = meta.repositories.git;
      rev = "fe0f368e1fcab2b89d5c94209822d9b616cea840";
      sha256 = "1knbkj1dm45s741qndsfclmk3pyxnihgwq2i1n75ip3wv8i1bf4b";
    };

    meta = with stdenv.lib; {
      description = "ZNC module for client specific buffers";
      homepage = https://github.com/jpnurmi/znc-clientbuffer;
      repositories.git = https://github.com/jpnurmi/znc-clientbuffer.git;
      license = licenses.asl20;
      maintainers = with maintainers; [ hrdinka ];
    };
  };

  fish = zncDerivation rec {
    name = "znc-fish-${version}";
    version = "git-2014-10-10";
    module_name = "fish";

    src = fetchgit {
      url = meta.repositories.git;
      rev = "9c580e018a1a08374e814fc06f551281cff827de";
      sha256 = "0yvs0jkwwp18qxqvw1dvir91ggczz56ka00k0zlsb81csdi8xfvl";
    };

    meta = {
      description = "ZNC FiSH module";
      homepage = https://github.com/dctrwatson/znc-fish;
      # this fork works with ZNC 1.6
      repositories.git = https://github.com/jarrydpage/znc-fish.git;
      maintainers = [ stdenv.lib.maintainers.offline ];
    };
  };

  privmsg = zncDerivation rec {
{'fraction_non_alphanumeric': 0.13648928818244643, 'fraction_numerical': 0.05908776779543884, 'mean_word_length': 2.938775510204082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '3303741', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1099, 'n_words': 180}