aboutsummaryrefslogtreecommitdiff
path: root/tools/snap-index.nix
blob: b72ee01af830faf1845a5f8c188e37e34c8f02f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ bionix
, flags ? null
}:

ref:

with bionix;
with lib;
with types;

assert (matchFiletype "snap-index" { fa = _: true; } ref);

stage {
  name = "snap-index";
  buildInputs = [ bionix.snap.app ];
  buildCommand = ''
    ln -s ${ref} ref.fa
    mkdir $out
    snap-aligner index ref.fa $out -t$NIX_BUILD_CORES ${optionalString (flags != null) flags}
  '';
  passthru.multicore = true;
}