about summary refs log tree commit diff
path: root/pkgs/applications/science/biology/platypus/default.nix
blob: 868540fcbc3b2488aaa0f5f55446464a952d6391 (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
{stdenv, fetchFromGitHub, python27, htslib, zlib, makeWrapper}:

let python = python27.withPackages (ps: with ps; [ cython ]);

in stdenv.mkDerivation rec {
  name = "platypus-unstable-${version}";
  version = "2017-03-07";

  src = fetchFromGitHub {
    owner = "andyrimmer";
    repo = "Platypus";
    rev = "cbbd914";
    sha256 = "0xgj3pl7n4c12j5pp5qyjfk4rsvb5inwzrpcbhdf3br5f3mmdsb9";
  };

  buildInputs = [ htslib python zlib makeWrapper ];

  buildPhase = ''
    patchShebangs .
    make
  '';

  installPhase = ''
    mkdir -p $out/libexec/platypus
    cp -r ./* $out/libexec/platypus

    mkdir -p $out/bin
    makeWrapper ${python}/bin/python $out/bin/platypus --add-flags "$out/libexec/platypus/bin/Platypus.py"
  '';

  meta = with stdenv.lib; {
    description = "The Platypus variant caller";
    license = licenses.gpl3;
    homepage = https://github.com/andyrimmer/Platypus;
    maintainers = with maintainers; [ jbedo ];
    platforms = platforms.unix;
  };
}