Skip to content

Commit

Permalink
python312Packagesfastnlo-toolkit: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Nov 28, 2024
1 parent 17399d3 commit db6d91c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions pkgs/by-name/fa/fastnlo-toolkit/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "https://fastnlo.hepforge.org/code/v25/fastnlo_toolkit-${version}.tar.gz";
sha256 = "sha256-7aIMYCOkHC/17CHYiEfrxvtSJxTDivrS7BQ32cGiEy0=";
hash = "sha256-7aIMYCOkHC/17CHYiEfrxvtSJxTDivrS7BQ32cGiEy0=";
};

postPatch = ''
substituteInPlace py-compile \
--replace-fail "import sys, os, py_compile, imp" "import sys, os, py_compile, importlib"
--replace-fail "imp." "importlib."
--replace-fail "hasattr(imp" "hasattr(importlib"
'';

patches = [
# Compatibility with YODA 2.x
./yoda2_support.patch
Expand All @@ -36,9 +43,14 @@ stdenv.mkDerivation rec {
yoda
] ++ lib.optional withPython python ++ lib.optional (withPython && python.isPy3k) ncurses;

propagatedBuildInputs = [
zlib
] ++ lib.optional withPython swig;
propagatedBuildInputs =
[
zlib
]
++ lib.optional withPython [
swig
python.pkgs.distutils
];

preConfigure = ''
substituteInPlace ./fastnlotoolkit/Makefile.in \
Expand Down

0 comments on commit db6d91c

Please sign in to comment.