blob: 1fde411f8b1d86c03280b47b321f831b24434c68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{ bionix
, nixpkgs
, flags ? null
}:
input:
with nixpkgs;
with lib;
with bionix.types;
assert (matchFiletype "samtools-faidx" { fa = _: true; } input);
stdenv.mkDerivation {
name = "samtools-faidx";
buildInputs = [ samtools ];
buildCommand = ''
ln -s ${input} input.fasta
samtools faidx ${optionalString (flags != null) flags} input.fasta
cp input.fasta.fai $out
'';
}
|