aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/bwa-mem.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/bwa-mem.nix b/tools/bwa-mem.nix
index 5a2772e..9af3992 100644
--- a/tools/bwa-mem.nix
+++ b/tools/bwa-mem.nix
@@ -3,6 +3,7 @@
, lib
, bc
, bwa
+, index ? callPackage ./bwa-index.nix { inherit bwa stdenv lib; }
, samtools ? null
, ref
, bamOutput ? true
@@ -17,14 +18,12 @@ assert bamOutput -> samtools != null;
with lib;
-let index = callPackage ./bwa-index.nix { inherit bwa stdenv lib; } ref;
-
-in stdenv.mkDerivation {
+stdenv.mkDerivation {
name = "bwa-mem";
buildInputs = [ bwa bc ] ++ optional bamOutput samtools;
buildCommand = ''
ln -s ${ref} ref.fa
- for f in ${index}/* ; do
+ for f in ${index ref}/* ; do
ln -s $f
done
cores=$(echo $NIX_BUILD_CORES ${optionalString bamOutput "- 1"} | bc)