Skip to content

Commit

Permalink
{yoda,lhapdf,fastnlo-toolkit}: fix and enable strictDeps (NixOS#366449)
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Dec 20, 2024
2 parents 7db241f + 5b93a4e commit d3a91c2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
12 changes: 8 additions & 4 deletions pkgs/by-name/fa/fastnlo-toolkit/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
stdenv,
fetchurl,
boost,
gfortran,
lhapdf,
ncurses,
perl,
Expand Down Expand Up @@ -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
];

Expand All @@ -68,6 +70,8 @@ stdenv.mkDerivation rec {
"--with-yoda=${yoda}"
] ++ lib.optional withPython "--enable-pyext";

strictDeps = true;

enableParallelBuilding = true;

doCheck = true;
Expand Down
9 changes: 8 additions & 1 deletion pkgs/development/libraries/physics/lhapdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
bash,
python,
makeWrapper,
}:
Expand All @@ -22,7 +23,10 @@ stdenv.mkDerivation rec {
'';

nativeBuildInputs =
[ makeWrapper ]
[
bash
makeWrapper
]
++ lib.optionals (python != null && lib.versionAtLeast python.version "3.10") [
python.pkgs.cython
];
Expand All @@ -34,13 +38,16 @@ stdenv.mkDerivation rec {
rm wrappers/python/lhapdf.cpp
'';

strictDeps = true;

enableParallelBuilding = true;

passthru = {
pdf_sets = import ./pdf_sets.nix { inherit lib stdenv fetchurl; };
};

postInstall = ''
patchShebangs --build $out/bin/lhapdf-config
wrapProgram $out/bin/lhapdf --prefix PYTHONPATH : "$(toPythonPath "$out")"
'';

Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/physics/yoda/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
stdenv,
fetchFromGitLab,
autoreconfHook,
bash,
python,
root,
makeWrapper,
Expand All @@ -23,6 +24,7 @@ stdenv.mkDerivation rec {

nativeBuildInputs = with python.pkgs; [
autoreconfHook
bash
cython
makeWrapper
];
Expand All @@ -43,6 +45,8 @@ stdenv.mkDerivation rec {
zlib
];

strictDeps = true;

enableParallelBuilding = true;

postPatch = ''
Expand All @@ -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
Expand Down

0 comments on commit d3a91c2

Please sign in to comment.