mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 13:35:13 +00:00
Merge pull request #215867 from veprbl/pr/nnpdf_4_0_6
nnpdf: 4.0.4 -> 4.0.6, provide n3fit
This commit is contained in:
commit
f032544122
@ -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 \
|
||||
|
50
pkgs/development/python-modules/n3fit/default.nix
Normal file
50
pkgs/development/python-modules/n3fit/default.nix
Normal file
@ -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 ];
|
||||
};
|
||||
}
|
@ -22,7 +22,7 @@ buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/validphys/version.py \
|
||||
--replace '= __give_git()' '= "${version}"'
|
||||
--replace '= __give_git()' '= "'$version'"'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user