flye: fix build with python312

This commit is contained in:
natsukium 2024-06-20 22:54:43 +09:00 committed by Martin Weinelt
parent 788fd6ee8f
commit a263138a37

View File

@ -1,5 +1,6 @@
{ lib
, fetchFromGitHub
, fetchpatch
, python3Packages
, zlib
, curl
@ -29,15 +30,29 @@ python3Packages.buildPythonApplication rec {
libdeflate
];
patches = [ ./aarch64-fix.patch ];
patches = [
./aarch64-fix.patch
(fetchpatch {
# https://github.com/mikolmogorov/Flye/pull/711
name = "remove-distutils.patch";
url = "https://github.com/mikolmogorov/Flye/commit/fb34f1ccfdf569d186a4ce822ee18eced736636b.patch";
hash = "sha256-52bnZ8XyP0HsY2OpNYMU3xJgotNVdQc/O2w3XIReUdQ=";
})
(fetchpatch {
# https://github.com/mikolmogorov/Flye/pull/670
name = "remove-find_module.patch";
url = "https://github.com/mikolmogorov/Flye/commit/441b1c6eb0f60b7c4fb1a40d659c7dabb7ad41b6.patch";
hash = "sha256-RytFIN1STK33/nvXpck6woQcwV/e1fmA8AgmptiIiDU=";
})
];
postPatch = ''
substituteInPlace flye/polishing/alignment.py \
--replace-fail "/bin/bash" "${lib.getExe bash}"
'';
substituteInPlace flye/tests/test_toy.py \
--replace-fail "find_executable(\"flye" "find_executable(\"$out/bin/flye" \
--replace-fail "[\"flye" "[\"$out/bin/flye"
preCheck = ''
export PATH=$out/bin:$PATH
'';
meta = with lib; {