1{ lib 2, buildPythonPackage 3, hyperopt 4, keras 5, nnpdf 6, psutil 7, tensorflow 8, validphys2 9}: 10 11buildPythonPackage rec { 12 pname = "n3fit"; 13 version = "4.0"; 14 format = "setuptools"; 15 16 inherit (nnpdf) src; 17 18 prePatch = '' 19 cd n3fit 20 ''; 21 22 postPatch = '' 23 substituteInPlace src/n3fit/version.py \ 24 --replace '= __give_git()' '= "'$version'"' 25 ''; 26 27 propagatedBuildInputs = [ 28 hyperopt 29 keras 30 psutil 31 tensorflow 32 validphys2 33 ]; 34 35 postInstall = '' 36 for prog in "$out"/bin/*; do 37 wrapProgram "$prog" --set PYTHONPATH "$PYTHONPATH:$(toPythonPath "$out")" 38 done 39 ''; 40 41 doCheck = false; # no tests 42 pythonImportsCheck = [ "n3fit" ]; 43 44 meta = with lib; { 45 description = "NNPDF fitting framework"; 46 homepage = "https://docs.nnpdf.science"; 47 inherit (nnpdf.meta) license; 48 maintainers = with maintainers; [ veprbl ]; 49 }; 50}