1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix

47 lines
1.1 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";
2020-03-10 22:08:10 +00:00
rev = "v0.3.4";
sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
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";
2020-03-10 22:08:10 +00:00
version = "0.2.9";
2018-07-06 04:58:00 +01:00
src = fetchFromGitHub {
owner = "brentp";
repo = "mosdepth";
rev = "v${version}";
2020-03-10 22:08:10 +00:00
sha256 = "01gm9gj2x2zs4yx6wk761fi1papi7qr3gp4ln1kkn8n2f9y9h849";
2018-07-06 04:58:00 +01:00
};
nativeBuildInputs = [ nim ];
buildInputs = [ htslib pcre ];
2018-07-06 04:58:00 +01:00
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";
meta = with stdenv.lib; {
description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing";
2018-07-06 04:58:00 +01:00
license = licenses.mit;
homepage = "https://github.com/brentp/mosdepth";
2018-07-06 04:58:00 +01:00
maintainers = with maintainers; [ jbedo ];
platforms = platforms.linux;
};
}