Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / fl / flye / package.nix
blob41e098609597a2ffc7ce0ffdcee19c6c06bb37d1
1 { lib
2 , fetchFromGitHub
3 , fetchpatch
4 , python3Packages
5 , zlib
6 , curl
7 , libdeflate
8 , bash
9 , coreutils
12 python3Packages.buildPythonApplication rec {
13   pname = "flye";
14   version = "2.9.4";
15   pyproject = true;
17   src = fetchFromGitHub {
18     owner = "fenderglass";
19     repo = "flye";
20     rev = "refs/tags/${version}";
21     hash = "sha256-lwiY0VTEsLMMXt1VowsS3jj44v30Z766xNRwQtQKr10=";
22   };
24   patches = [
25     (fetchpatch {
26       # https://github.com/mikolmogorov/Flye/pull/691
27       name = "aarch64-fix.patch";
28       url = "https://github.com/mikolmogorov/Flye/commit/e4dcc3fdf0fa1430a974fcd7da31b03ea642df9b.patch";
29       hash = "sha256-Ny2daPt8eYOKnwZ6bdBoCcFWhe9eiIHF4vJU/occwU0=";
30     })
31     (fetchpatch {
32       # https://github.com/mikolmogorov/Flye/pull/711
33       name = "remove-distutils.patch";
34       url = "https://github.com/mikolmogorov/Flye/commit/fb34f1ccfdf569d186a4ce822ee18eced736636b.patch";
35       hash = "sha256-52bnZ8XyP0HsY2OpNYMU3xJgotNVdQc/O2w3XIReUdQ=";
36     })
37     (fetchpatch {
38       # https://github.com/mikolmogorov/Flye/pull/670
39       name = "remove-find_module.patch";
40       url = "https://github.com/mikolmogorov/Flye/commit/441b1c6eb0f60b7c4fb1a40d659c7dabb7ad41b6.patch";
41       hash = "sha256-RytFIN1STK33/nvXpck6woQcwV/e1fmA8AgmptiIiDU=";
42     })
43   ];
45   postPatch = ''
46     substituteInPlace flye/polishing/alignment.py \
47       --replace-fail "/bin/bash" "${lib.getExe bash}"
48   '';
50   build-system = [ python3Packages.setuptools ];
52   propagatedBuildInputs = [ coreutils ];
54   buildInputs = [
55     zlib
56     curl
57     libdeflate
58   ];
60   pythonImportsCheck = [ "flye" ];
62   nativeCheckInputs = [ python3Packages.pytestCheckHook ];
64   preCheck = ''
65     export PATH=$out/bin:$PATH
66   '';
68   meta = with lib; {
69     description = "De novo assembler for single molecule sequencing reads using repeat graphs";
70     homepage = "https://github.com/fenderglass/Flye";
71     license = licenses.bsd3;
72     mainProgram = "flye";
73     maintainers = with maintainers; [ assistant ];
74   };