<commit_before>{lib, fetchgit, buildPythonPackage, pytest, numpy, scipy, matplotlib, docutils}:

buildPythonPackage rec {
  pname = "sasmodels";
  version = "0.96";

  buildInputs = [pytest];
  propagatedBuildInputs = [docutils matplotlib numpy scipy];

  preCheck = ''export HOME=$(mktemp -d)'';

  src = fetchgit {
    url = "https://github.com/SasView/sasmodels.git";
    rev = "v${version}";
    sha256 = "11qaaqdc23qzb75zs48fkypksmcb332vl0pkjqr5bijxxymgm7nw";
  };

  meta = {
    description = "Library of small angle scattering models";
    homepage = http://sasview.org;
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ rprospero ];
  };
}<commit_msg>pythonPackages.sasmodels: fix build (#40381)<commit_after>{ lib, fetchFromGitHub, buildPythonPackage, pytest, numpy, scipy, matplotlib, docutils
, pyopencl, opencl-headers
}:

buildPythonPackage rec {
  pname = "sasmodels-unstable";
  version = "2018-04-27";

  src = fetchFromGitHub {
    owner = "SasView";
    repo = "sasmodels";
    rev = "33969b656596e8b6cc8ce934cd1f8062f7b11cf2";
    sha256 = "00rvhafg08qvx0k9mzn1ppdkc9i5yfn2gr3hidrf416srf8zgb85";
  };

  buildInputs = [ opencl-headers ];
  checkInputs = [ pytest ];
  propagatedBuildInputs = [ docutils matplotlib numpy scipy pyopencl ];

  checkPhase = ''
    HOME=$(mktemp -d) py.test -c ./pytest.ini
  '';

  meta = {
    description = "Library of small angle scattering models";
    homepage = http://sasview.org;
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ rprospero ];
  };
}
{'fraction_non_alphanumeric': 0.12845215157353887, 'fraction_numerical': 0.05202312138728324, 'mean_word_length': 3.9935897435897436, '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': '6715650', 'n_tokens_mistral': 632, 'n_tokens_neox': 578, 'n_words': 111}