aboutsummaryrefslogtreecommitdiff
path: root/tools/bwa-index.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bwa-index.nix')
-rw-r--r--tools/bwa-index.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bwa-index.nix b/tools/bwa-index.nix
index 48a2556..c879bc4 100644
--- a/tools/bwa-index.nix
+++ b/tools/bwa-index.nix
@@ -7,12 +7,15 @@ ref:
with nixpkgs;
with lib;
+with bionix.types;
+
+assert (matchFiletype "bwa-index" { fa = _: true; } ref);
stdenv.mkDerivation {
name = "bwa-index";
buildInputs = [ bwa ];
buildCommand = ''
- ln -s ${ref.seq} ref.fa
+ ln -s ${ref} ref.fa
bwa index ${optionalString (flags != null) flags} ref.fa
mkdir $out
mv ref.fa.* $out