Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / trectools / default.nix
blobf6870bd48c1ab5522d8d71cd58e8a2ed061a6a93
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , beautifulsoup4
5 , pythonOlder
6 , pandas
7 , python
8 , numpy
9 , scikit-learn
10 , scipy
11 , lxml
12 , matplotlib
13 , sarge
16 buildPythonPackage rec {
17   pname = "trectools";
18   version = "0.0.49";
19   format = "setuptools";
21   disabled = pythonOlder "3.6";
23   src = fetchFromGitHub {
24     owner = "joaopalotti";
25     repo = pname;
26     # https://github.com/joaopalotti/trectools/issues/41
27     rev = "5c1d56e9cf955f45b5a1780ee6a82744d31e7a79";
28     hash = "sha256-Lh6sK2rxEdCsOUKHn1jgm+rsn8FK1f2po0UuZfZajBA=";
29   };
31   postPatch = ''
32     substituteInPlace setup.py \
33       --replace "bs4 >= 0.0.0.1" "beautifulsoup4 >= 4.11.1"
34   '';
36   propagatedBuildInputs = [
37     pandas
38     numpy
39     scikit-learn
40     scipy
41     lxml
42     beautifulsoup4
43     matplotlib
44     sarge
45   ];
47   checkPhase = ''
48     cd unittests
49     ${python.interpreter} -m unittest runner
50   '';
52   pythonImportsCheck = [ "trectools" ];
54   meta = with lib; {
55     homepage = "https://github.com/joaopalotti/trectools";
56     description = "Library for assisting Information Retrieval (IR) practitioners with TREC-like campaigns";
57     license = licenses.bsdOriginal;
58     maintainers = with maintainers; [ MoritzBoehme ];
59   };