Unverified Commit 34ccf74c authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

python3Packages.n3fit: init at 4.0

parent ede042f5
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, hyperopt
, keras
, nnpdf
, psutil
, tensorflow
, validphys2
}:

buildPythonPackage rec {
  pname = "n3fit";
  version = "4.0";
  format = "setuptools";

  inherit (nnpdf) src;

  prePatch = ''
    cd n3fit
  '';

  postPatch = ''
    substituteInPlace src/n3fit/version.py \
      --replace '= __give_git()' '= "'$version'"'
  '';

  propagatedBuildInputs = [
    hyperopt
    keras
    psutil
    tensorflow
    validphys2
  ];

  postInstall = ''
    for prog in "$out"/bin/*; do
      wrapProgram "$prog" --set PYTHONPATH "$PYTHONPATH:$(toPythonPath "$out")"
    done
  '';

  doCheck = false; # no tests
  pythonImportsCheck = [ "n3fit" ];

  meta = with lib; {
    description = "NNPDF fitting framework";
    homepage = "https://docs.nnpdf.science";
    inherit (nnpdf.meta) license;
    maintainers = with maintainers; [ veprbl ];
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ buildPythonPackage rec {

  postPatch = ''
    substituteInPlace src/validphys/version.py \
      --replace '= __give_git()' '= "${version}"'
      --replace '= __give_git()' '= "'$version'"'
  '';

  propagatedBuildInputs = [
+2 −0
Original line number Diff line number Diff line
@@ -6188,6 +6188,8 @@ self: super: with self; {

  myst-parser = callPackage ../development/python-modules/myst-parser { };

  n3fit = callPackage ../development/python-modules/n3fit { };

  nad-receiver = callPackage ../development/python-modules/nad-receiver { };

  nagiosplugin = callPackage ../development/python-modules/nagiosplugin { };