2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, apfel
|
|
|
|
, gsl
|
|
|
|
, lhapdf
|
|
|
|
, libarchive
|
2023-02-02 18:25:31 +00:00
|
|
|
, yaml-cpp
|
2022-05-18 14:49:53 +00:00
|
|
|
, python3
|
|
|
|
, sqlite
|
|
|
|
, swig
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nnpdf";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.0.9";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NNPDF";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-PyhkHlOlzKfDxUX91NkeZWjdEzFR4PW0Yh5Yz6ZA27g=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
for file in CMakeLists.txt buildmaster/CMakeLists.txt; do
|
|
|
|
substituteInPlace $file \
|
|
|
|
--replace "-march=nocona -mtune=haswell" ""
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
apfel
|
|
|
|
gsl
|
|
|
|
lhapdf
|
|
|
|
libarchive
|
2023-02-02 18:25:31 +00:00
|
|
|
yaml-cpp
|
2022-05-18 14:49:53 +00:00
|
|
|
python3
|
|
|
|
python3.pkgs.numpy
|
|
|
|
sqlite
|
|
|
|
swig
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCOMPILE_filter=ON"
|
|
|
|
"-DCOMPILE_evolvefit=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Open-source machine learning framework for global analyses of parton distributions";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "evolven3fit";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://docs.nnpdf.science/";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = [ maintainers.veprbl ];
|
|
|
|
platforms = platforms.unix;
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
|
|
broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64);
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
}
|