<commit_before>{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, libsodium
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "libnacl";
  version = "1.7.2";

  src = fetchFromGitHub {
    owner = "saltstack";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-nttR9PQimhqd2pByJ5IJzJ4RmSI4y7lcX7a7jcK+vqc=";
  };

  buildInputs = [ libsodium ];

  postPatch =<commit_msg>python3Packages.libnacl: fix build on 32-bit platforms<commit_after>{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, libsodium
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "libnacl";
  version = "1.7.2";

  src = fetchFromGitHub {
    owner = "saltstack";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-nttR9PQimhqd2pByJ5IJzJ4RmSI4y7lcX7a7jcK+vqc=";
  };

  patches = [
    # Fixes build on 32-bit platforms
    (fetchpatch {
      name = "fix-crypto_kdf_derive_from_key-32bit.patch";
      url = "https://github.com/saltstack/libnacl/commit/e8a1f95ee1d4d0806fb6aee793dcf308b05d485d.patch";
      sha256 = "sha256-z6TAVNfPcuWZ/hRgk6Aa8I1IGzne7/NYnUOOQ3TjGVU=";
    })
  ];

  buildInputs = [ libsodium ];

  postPatch =
{'fraction_non_alphanumeric': 0.12371134020618557, 'fraction_numerical': 0.06443298969072164, 'mean_word_length': 3.8140495867768593, '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': '1365267', 'n_tokens_mistral': 551, 'n_tokens_neox': 498, 'n_words': 71}