about summary refs log tree commit diff
path: root/pkgs/by-name/fl/flye/package.nix
blob: ccbb56eb67952386f98be1360ee10cd8d90f4862 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, fetchFromGitHub
, python3Packages
, zlib
, curl
, libdeflate
, bash
, coreutils
}:

python3Packages.buildPythonApplication rec {
  pname = "flye";
  version = "2.9.3";

  src = fetchFromGitHub {
    owner = "fenderglass";
    repo = "flye";
    rev = version;
    hash = "sha256-IALqtIPmvDYoH4w/tk2WB/P/pAcKXxgnsu9PFp+wIes=";
  };

  nativeCheckInputs = [ python3Packages.pytestCheckHook ];

  propagatedBuildInputs = [ coreutils ];

  buildInputs = [
    zlib
    curl
    libdeflate
  ];

  patches = [ ./aarch64-fix.patch ];

  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"
  '';

  meta = with lib; {
    description = "De novo assembler for single molecule sequencing reads using repeat graphs";
    homepage = "https://github.com/fenderglass/Flye";
    license = licenses.bsd3;
    platforms = platforms.unix;
    mainProgram = "flye";
    maintainers = with maintainers; [ assistant ];
  };
}