diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2023-02-13 12:58:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 12:58:38 -0500 |
commit | f03254412280b992d5673e7cff0e126680ba8582 (patch) | |
tree | 94b2cbe6a96477d9fde7782da1bd38c449b94017 /pkgs | |
parent | 5b7b4ed32ef46117b44c7a60c2e02c71f65b7417 (diff) | |
parent | 34ccf74c23cdcf6013c841a2575ebb8c12875680 (diff) |
Merge pull request #215867 from veprbl/pr/nnpdf_4_0_6
nnpdf: 4.0.4 -> 4.0.6, provide n3fit
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/science/physics/nnpdf/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/python-modules/n3fit/default.nix | 50 | ||||
-rw-r--r-- | pkgs/development/python-modules/validphys2/default.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
4 files changed, 55 insertions, 11 deletions
diff --git a/pkgs/applications/science/physics/nnpdf/default.nix b/pkgs/applications/science/physics/nnpdf/default.nix index c3ac1f6e0a8d5..ec29c02054df2 100644 --- a/pkgs/applications/science/physics/nnpdf/default.nix +++ b/pkgs/applications/science/physics/nnpdf/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , cmake , pkg-config , apfel @@ -16,22 +15,15 @@ stdenv.mkDerivation rec { pname = "nnpdf"; - version = "4.0.4"; + version = "4.0.6"; src = fetchFromGitHub { owner = "NNPDF"; repo = pname; rev = version; - sha256 = "sha256-Alx4W0TkPzJBsnRXcKBrlEU6jWTnOjrji/IPk+dNCw0="; + hash = "sha256-mwOMNlYFhHZq/wakO1/HGwcxvKGKh5OyFa2D9d3Y3IA="; }; - patches = [ - (fetchpatch { - url = "https://github.com/NNPDF/nnpdf/commit/7943b62a91d3a41fd4f6366b18881d50695f4b45.diff"; - hash = "sha256-UXhTO7vZgJiY8h3bgjg7SQC0gMUQsYQ/V/PgtCEQ7VU="; - }) - ]; - postPatch = '' for file in CMakeLists.txt buildmaster/CMakeLists.txt; do substituteInPlace $file \ diff --git a/pkgs/development/python-modules/n3fit/default.nix b/pkgs/development/python-modules/n3fit/default.nix new file mode 100644 index 0000000000000..5c8b06b74a658 --- /dev/null +++ b/pkgs/development/python-modules/n3fit/default.nix @@ -0,0 +1,50 @@ +{ 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 ]; + }; +} diff --git a/pkgs/development/python-modules/validphys2/default.nix b/pkgs/development/python-modules/validphys2/default.nix index c417cb47e2d31..38debb91be11b 100644 --- a/pkgs/development/python-modules/validphys2/default.nix +++ b/pkgs/development/python-modules/validphys2/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace src/validphys/version.py \ - --replace '= __give_git()' '= "${version}"' + --replace '= __give_git()' '= "'$version'"' ''; propagatedBuildInputs = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a2a2dfa6427d8..beec1b459dc7e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6196,6 +6196,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 { }; |