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