aboutsummaryrefslogtreecommitdiff
path: root/tools/bwa-index.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-10-05 16:16:20 +1000
committerJustin Bedo <cu@cua0.org>2018-10-05 16:19:06 +1000
commit871ef64f3c43199dfa01216ac86db56650c2c8a2 (patch)
tree7053b4533d7306b3fc0eed8f9bc25e8e2abb6d6e /tools/bwa-index.nix
parentdd3666f6a069105e61f8889665cf55eed9a14e51 (diff)
implement types
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