{yoda,lhapdf,fastnlo-toolkit}: fix and enable strictDeps (#366449)

This commit is contained in:
Dmitry Kalinkin
2024-12-20 05:55:44 -05:00
committed by GitHub
3 changed files with 21 additions and 5 deletions

View File

@@ -3,7 +3,6 @@
stdenv,
fetchurl,
boost,
gfortran,
lhapdf,
ncurses,
perl,
@@ -35,23 +34,26 @@ stdenv.mkDerivation rec {
./yoda2_support.patch
];
nativeBuildInputs = [
lhapdf # lhapdf-config
yoda # yoda-config
] ++ lib.optional withPython python;
buildInputs =
[
boost
gfortran
gfortran.cc.lib
lhapdf
yoda
]
++ lib.optional withPython python
++ lib.optional (withPython && python.isPy3k) ncurses;
propagatedNativeBuildInputs = lib.optional withPython [ swig ];
propagatedBuildInputs =
[
zlib
]
++ lib.optional withPython [
swig
python.pkgs.distutils
];
@@ -68,6 +70,8 @@ stdenv.mkDerivation rec {
"--with-yoda=${yoda}"
] ++ lib.optional withPython "--enable-pyext";
strictDeps = true;
enableParallelBuilding = true;
doCheck = true;

View File

@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
bash,
python,
makeWrapper,
}:
@@ -22,7 +23,10 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs =
[ makeWrapper ]
[
bash
makeWrapper
]
++ lib.optionals (python != null && lib.versionAtLeast python.version "3.10") [
python.pkgs.cython
];
@@ -34,6 +38,8 @@ stdenv.mkDerivation rec {
rm wrappers/python/lhapdf.cpp
'';
strictDeps = true;
enableParallelBuilding = true;
passthru = {
@@ -41,6 +47,7 @@ stdenv.mkDerivation rec {
};
postInstall = ''
patchShebangs --build $out/bin/lhapdf-config
wrapProgram $out/bin/lhapdf --prefix PYTHONPATH : "$(toPythonPath "$out")"
'';

View File

@@ -3,6 +3,7 @@
stdenv,
fetchFromGitLab,
autoreconfHook,
bash,
python,
root,
makeWrapper,
@@ -23,6 +24,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = with python.pkgs; [
autoreconfHook
bash
cython
makeWrapper
];
@@ -43,6 +45,8 @@ stdenv.mkDerivation rec {
zlib
];
strictDeps = true;
enableParallelBuilding = true;
postPatch = ''
@@ -54,6 +58,7 @@ stdenv.mkDerivation rec {
'';
postInstall = ''
patchShebangs --build $out/bin/yoda-config
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done