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