3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

{stdenv, fetchFromGitHub, nim, htslib, pcre}:
2018-07-06 04:58:00 +01:00
let
hts-nim = fetchFromGitHub {
owner = "brentp";
repo = "hts-nim";
2019-06-22 21:41:59 +01:00
rev = "v0.2.14";
sha256 = "0d1z4b6mrppmz3hgkxd4wcy79w68icvhi7q7n3m2k17n8f3xbdx3";
2018-07-06 04:58:00 +01:00
};
docopt = fetchFromGitHub {
owner = "docopt";
repo = "docopt.nim";
2019-06-22 21:41:59 +01:00
rev = "v0.6.7";
sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
2018-07-06 04:58:00 +01:00
};
in stdenv.mkDerivation rec {
pname = "mosdepth";
2019-06-22 21:41:59 +01:00
version = "0.2.6";
2018-07-06 04:58:00 +01:00
src = fetchFromGitHub {
owner = "brentp";
repo = "mosdepth";
rev = "v${version}";
2019-06-22 21:41:59 +01:00
sha256 = "0i9pl9lsli3y84ygxanrr525gfg8fs9h481944cbzsmqmbldwvgk";
2018-07-06 04:58:00 +01:00
};
buildInputs = [ nim ];
2018-10-31 21:03:27 +00:00
buildPhase = ''
HOME=$TMPDIR
nim -p:${hts-nim}/src -p:${docopt}/src c --nilseqs:on -d:release mosdepth.nim
'';
2018-07-06 04:58:00 +01:00
installPhase = "install -Dt $out/bin mosdepth";
fixupPhase = "patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ stdenv.cc.cc htslib pcre ]} $out/bin/mosdepth";
meta = with stdenv.lib; {
description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing.";
license = licenses.mit;
homepage = https://github.com/brentp/mosdepth;
maintainers = with maintainers; [ jbedo ];
platforms = platforms.linux;
};
}