mosdepth: convert to buildNimPackage
This commit is contained in:
parent
114ca1a5a8
commit
323c503cba
@ -1,23 +1,9 @@
|
||||
{lib, stdenv, fetchFromGitHub, nim, htslib, pcre}:
|
||||
{lib, nimPackages, fetchFromGitHub, pcre}:
|
||||
|
||||
let
|
||||
hts-nim = fetchFromGitHub {
|
||||
owner = "brentp";
|
||||
repo = "hts-nim";
|
||||
rev = "v0.3.4";
|
||||
sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
|
||||
};
|
||||
|
||||
docopt = fetchFromGitHub {
|
||||
owner = "docopt";
|
||||
repo = "docopt.nim";
|
||||
rev = "v0.6.7";
|
||||
sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
nimPackages.buildNimPackage rec {
|
||||
pname = "mosdepth";
|
||||
version = "0.3.2";
|
||||
nimBinOnly = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "brentp";
|
||||
@ -26,15 +12,7 @@ in stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-uui4yC7ok+pvbXVKfBVsAarH40fnH4fnP8P4uzOqztQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ nim ];
|
||||
buildInputs = [ htslib pcre ];
|
||||
|
||||
buildPhase = ''
|
||||
HOME=$TMPDIR
|
||||
nim -p:${hts-nim}/src -p:${docopt}/src c --nilseqs:on -d:release mosdepth.nim
|
||||
'';
|
||||
|
||||
installPhase = "install -Dt $out/bin mosdepth";
|
||||
buildInputs = with nimPackages; [ docopt hts-nim pcre ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing";
|
||||
|
8
pkgs/development/nim-packages/docopt/default.nix
Normal file
8
pkgs/development/nim-packages/docopt/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ fetchFromGitHub }:
|
||||
|
||||
fetchFromGitHub {
|
||||
owner = "docopt";
|
||||
repo = "docopt.nim";
|
||||
rev = "v0.6.7";
|
||||
sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
|
||||
}
|
13
pkgs/development/nim-packages/hts-nim/default.nix
Normal file
13
pkgs/development/nim-packages/hts-nim/default.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ buildNimPackage, fetchFromGitHub, htslib }:
|
||||
|
||||
buildNimPackage rec {
|
||||
pname = "hts-nim";
|
||||
version = "0.3.4";
|
||||
src = fetchFromGitHub {
|
||||
owner = "brentp";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
|
||||
};
|
||||
propagatedBuildInputs = [ htslib ];
|
||||
}
|
@ -16,10 +16,14 @@ lib.makeScope newScope (self:
|
||||
|
||||
chroma = callPackage ../development/nim-packages/chroma { };
|
||||
|
||||
docopt = callPackage ../development/nim-packages/docopt { };
|
||||
|
||||
flatty = callPackage ../development/nim-packages/flatty { };
|
||||
|
||||
frosty = callPackage ../development/nim-packages/frosty { };
|
||||
|
||||
hts-nim = callPackage ../development/nim-packages/hts-nim { };
|
||||
|
||||
jester = callPackage ../development/nim-packages/jester { };
|
||||
|
||||
jsonschema = callPackage ../development/nim-packages/jsonschema { };
|
||||
|
Loading…
Reference in New Issue
Block a user