summary refs log tree commit diff
path: root/pkgs/applications/science/biology/strelka/default.nix
blob: 1527f5d3ddad24ff68dd1e87084bbe3e05ffdc67 (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
{stdenv, fetchFromGitHub, cmake, zlib, python2}:

stdenv.mkDerivation rec {
  name = "strelka-${version}";
  version = "2.9.5";

  src = fetchFromGitHub {
    owner = "Illumina";
    repo = "strelka";
    rev = "v${version}";
    sha256 = "0x4a6nkx1jnyag9svghsdjz1fz6q7qx5pn77wphdfnk81f9yspf8";
  };

  buildInputs = [ cmake zlib python2 ];

  preConfigure = ''
    sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py
    patchShebangs .
  '';

  postFixup = ''
    pushd $out/lib/python/pyflow
    sed -i 's|/bin/bash|${stdenv.shell}|' pyflowTaskWrapper.py
    rm pyflowTaskWrapper.pyc
    echo "import pyflowTaskWrapper" | python2
    popd
  '';

  meta = with stdenv.lib; {
    description = "Germline and small variant caller";
    license = licenses.gpl3;
    homepage = https://github.com/Illumina/strelka;
    maintainers = with maintainers; [ jbedo ];
    platforms = [ "x86_64-linux" ];
  };

}