1{
2 lib,
3 fetchFromGitHub,
4 fetchpatch,
5 python3Packages,
6 zlib,
7 curl,
8 libdeflate,
9 bash,
10 coreutils,
11 addBinToPathHook,
12}:
13
14python3Packages.buildPythonApplication rec {
15 pname = "flye";
16 version = "2.9.6";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "fenderglass";
21 repo = "flye";
22 tag = version;
23 hash = "sha256-ZdrAxPKY3+HJ388tGCdpDcvW70mJ5wd4uOUkuufyqK8=";
24 };
25
26 patches = [
27 (fetchpatch {
28 # https://github.com/mikolmogorov/Flye/pull/691
29 name = "aarch64-fix.patch";
30 url = "https://github.com/mikolmogorov/Flye/commit/e4dcc3fdf0fa1430a974fcd7da31b03ea642df9b.patch";
31 hash = "sha256-Ny2daPt8eYOKnwZ6bdBoCcFWhe9eiIHF4vJU/occwU0=";
32 })
33 ];
34
35 postPatch = ''
36 substituteInPlace flye/polishing/alignment.py \
37 --replace-fail "/bin/bash" "${lib.getExe bash}"
38 '';
39
40 build-system = [ python3Packages.setuptools ];
41
42 propagatedBuildInputs = [ coreutils ];
43
44 buildInputs = [
45 zlib
46 curl
47 libdeflate
48 ];
49
50 pythonImportsCheck = [ "flye" ];
51
52 nativeCheckInputs = [
53 addBinToPathHook
54 python3Packages.pytestCheckHook
55 ];
56
57 meta = with lib; {
58 description = "De novo assembler for single molecule sequencing reads using repeat graphs";
59 homepage = "https://github.com/fenderglass/Flye";
60 license = licenses.bsd3;
61 mainProgram = "flye";
62 maintainers = with maintainers; [ assistant ];
63 };
64}