aboutsummaryrefslogtreecommitdiff
path: root/tools/samtools-sort.nix
blob: 1a79c9fb804de2de887e699d55a5f69d1f29372a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ stdenv
, callPackage
, lib
, samtools
, nameSort ? false
, flags ? null
}:

input:

with lib;

stdenv.mkDerivation {
  name = "samtools-sort";
  buildInputs = [ samtools ];
  buildCommand = ''
    samtools sort -@ $NIX_BUILD_CORES ${optionalString nameSort "-n"} ${optionalString (flags != null) flags} ${input} > $out
  '';
}