<commit_before>{ lib, stdenv, fetchFromGitHub, cmake, python2 }:

stdenv.mkDerivation rec {
  version = "0.6.3";
  pname = "docopt.cpp";

  src = fetchFromGitHub {
    owner = "docopt";
    repo = "docopt.cpp";
    rev = "v${version}";
    sha256 = "0cz3vv7g5snfbsqcf3q8bmd6kv5qp84gj3avwkn4vl00krw13bl7";
  };

  nativeBuildInputs = [ cmake python2 ];

  cmakeFlags = ["-DWITH_TESTS=ON"];

  strictDeps = true;<commit_msg>docopt_cpp: patch to support python3 for running tests<commit_after>{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, python3 }:

stdenv.mkDerivation rec {
  version = "0.6.3";
  pname = "docopt.cpp";

  src = fetchFromGitHub {
    owner = "docopt";
    repo = "docopt.cpp";
    rev = "v${version}";
    sha256 = "0cz3vv7g5snfbsqcf3q8bmd6kv5qp84gj3avwkn4vl00krw13bl7";
  };

  patches = [
    (fetchpatch {
      name = "python3-for-tests";
      url = "https://github.com/docopt/docopt.cpp/commit/b3d909dc952ab102a4ad5a1541a41736f35b92ba.patch";
      hash = "sha256-JJR09pbn3QhYaZAIAjs+pe28+g1VfgHUKspWorHzr8o=";
    })
  ];

  nativeBuildInputs = [ cmake python3 ];

  cmakeFlags = ["-DWITH_TESTS=ON"];

  strictDeps = true;
{'fraction_non_alphanumeric': 0.1391304347826087, 'fraction_numerical': 0.07565217391304348, 'mean_word_length': 3.8361344537815127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '819495', 'n_tokens_mistral': 532, 'n_tokens_neox': 488, 'n_words': 73}