summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/libraries/physics/lhapdf/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/libraries/physics/lhapdf/default.nix b/pkgs/development/libraries/physics/lhapdf/default.nix
index eb891fd4dbe..c31d9794407 100644
--- a/pkgs/development/libraries/physics/lhapdf/default.nix
+++ b/pkgs/development/libraries/physics/lhapdf/default.nix
@@ -15,9 +15,14 @@ stdenv.mkDerivation rec {
     substituteInPlace src/GridPDF.cc --replace '#include <locale>' '#include <xlocale.h>'
   '';
 
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optionals (lib.versionAtLeast python.version "3.10") [ python.pkgs.cython ];
   buildInputs = [ python ];
 
+  preBuild = lib.optionalString (lib.versionAtLeast python.version "3.10") ''
+    rm wrappers/python/lhapdf.cpp
+  '';
+
   enableParallelBuilding = true;
 
   passthru = {