Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

FliegendeWurst
Copy link
Member

All done in one PR because the packages look very related.

ref. #178468

Things done

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pkgs/by-name/fa/fastnlo-toolkit/package.nix Show resolved Hide resolved
@veprbl
Copy link
Member

veprbl commented Dec 19, 2024

Result of nixpkgs-review pr 366449 run on x86_64-linux 1

2 packages failed to build:
  • python311Packages.fastnlo-toolkit
  • python312Packages.fastnlo-toolkit
21 packages built:
  • apfel
  • apfelgrid
  • applgrid
  • fastnlo-toolkit
  • herwig
  • lhapdf (python312Packages.lhapdf)
  • mcfm
  • nnpdf (python312Packages.nnpdf)
  • professor
  • pythia
  • python311Packages.lhapdf
  • python311Packages.nnpdf
  • python311Packages.rivet
  • python311Packages.yoda
  • rivet (python312Packages.rivet)
  • yoda (python312Packages.yoda)
  • sacrifice
  • sherpa
  • thepeg
  • xfitter
  • yoda-with-root

@veprbl
Copy link
Member

veprbl commented Dec 20, 2024

Need to move around more inputs to make python bindings build:

diff --git a/pkgs/by-name/fa/fastnlo-toolkit/package.nix b/pkgs/by-name/fa/fastnlo-toolkit/package.nix
index d43cc2698c1b..db79f1be9f83 100644
--- a/pkgs/by-name/fa/fastnlo-toolkit/package.nix
+++ b/pkgs/by-name/fa/fastnlo-toolkit/package.nix
@@ -3,7 +3,6 @@
   stdenv,
   fetchurl,
   boost,
-  gfortran,
   lhapdf,
   ncurses,
   perl,
@@ -35,25 +34,18 @@ stdenv.mkDerivation rec {
     ./yoda2_support.patch
   ];
 
-  buildInputs =
-    [
-      boost
-      gfortran
-      gfortran.cc.lib
-      lhapdf
-      yoda
-    ]
-    ++ lib.optional withPython python
-    ++ lib.optional (withPython && python.isPy3k) ncurses;
+  nativeBuildInputs = [
+    lhapdf
+    yoda
+  ] ++ lib.optional withPython python;
+  buildInputs = [
+    boost
+    lhapdf
+    yoda
+  ] ++ lib.optional withPython python ++ lib.optional (withPython && python.isPy3k) ncurses;
 
-  propagatedBuildInputs =
-    [
-      zlib
-    ]
-    ++ lib.optional withPython [
-      swig
-      python.pkgs.distutils
-    ];
+  propagatedNativeBuildInputs = lib.optional withPython [ swig ];
+  propagatedBuildInputs = [ zlib ] ++ lib.optional withPython [ python.pkgs.distutils ];
 
   preConfigure = ''
     substituteInPlace ./fastnlotoolkit/Makefile.in \
@@ -64,9 +56,7 @@ stdenv.mkDerivation rec {
     chmod +x check/fnlo-tk-stattest.pl.in
   '';
 
-  configureFlags = [
-    "--with-yoda=${yoda}"
-  ] ++ lib.optional withPython "--enable-pyext";
+  configureFlags = [ "--with-yoda=${yoda}" ] ++ lib.optional withPython "--enable-pyext";
 
   enableParallelBuilding = true;
 
@@ -84,6 +74,8 @@ stdenv.mkDerivation rec {
   # Use a workaround from https://github.com/swig/swig/issues/1538
   env.CXXFLAGS = "-D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES";
 
+  strictDeps = true;
+
   meta = with lib; {
     homepage = "http://fastnlo.hepforge.org";
     description = "Fast pQCD calculations for hadron-induced processes";

Also remove the currently unused gfortran inputs.

Co-Authored-By: veprbl <[email protected]>
@veprbl
Copy link
Member

veprbl commented Dec 20, 2024

Result of nixpkgs-review pr 366449 run on x86_64-linux 1

23 packages built:
  • apfel
  • apfelgrid
  • applgrid
  • fastnlo-toolkit
  • herwig
  • lhapdf (python312Packages.lhapdf)
  • mcfm
  • nnpdf (python312Packages.nnpdf)
  • professor
  • pythia
  • python311Packages.fastnlo-toolkit
  • python311Packages.lhapdf
  • python311Packages.nnpdf
  • python311Packages.rivet
  • python311Packages.yoda
  • python312Packages.fastnlo-toolkit
  • rivet (python312Packages.rivet)
  • yoda (python312Packages.yoda)
  • sacrifice
  • sherpa
  • thepeg
  • xfitter
  • yoda-with-root

@veprbl veprbl merged commit d3a91c2 into NixOS:master Dec 20, 2024
23 of 24 checks passed
@veprbl
Copy link
Member

veprbl commented Dec 20, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants