diff options
author | Justin Bedo <cu@cua0.org> | 2018-09-20 13:57:12 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2018-09-20 14:34:36 +1000 |
commit | 33a121a7bad5b2608cc41ce60ab3d65676541fa6 (patch) | |
tree | dbbce4154a85988f3bfd9b13d42ad5d37f04e18a /tools/samtools-index.nix | |
parent | f0a8a4de59ea79f56e074ddd16eff0ce1782dfe8 (diff) |
Wrap some tools and make an example pipeline
Diffstat (limited to 'tools/samtools-index.nix')
-rw-r--r-- | tools/samtools-index.nix | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/samtools-index.nix b/tools/samtools-index.nix new file mode 100644 index 0000000..2fd066f --- /dev/null +++ b/tools/samtools-index.nix @@ -0,0 +1,20 @@ +{ stdenv +, callPackage +, lib +, samtools +, flags ? null +}: + +input: + +with lib; + +stdenv.mkDerivation { + name = "samtools-index"; + buildInputs = [ samtools ]; + buildCommand = '' + ln -s ${input} input.bam + samtools index -@ $NIX_BUILD_CORES ${optionalString (flags != null) flags} input.bam + cp input.bam.bai $out + ''; +} |