aboutsummaryrefslogtreecommitdiff
path: root/tools/bwa-mem.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-01-09 16:38:42 +1100
committerJustin Bedo <cu@cua0.org>2019-01-09 16:38:42 +1100
commitc3babc9eb65dc8c56d07ce8a6ee0d8c03bbd223e (patch)
treef7d88ec21635664781c7c79fe0ea6f962ae38004 /tools/bwa-mem.nix
parent9fd618d0305d4927c8d86fc37238d1216e401967 (diff)
large refactor
- use bionix.pkgs instead of nixpkgs - replace stdenv.mkDerivation with stage
Diffstat (limited to 'tools/bwa-mem.nix')
-rw-r--r--tools/bwa-mem.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/bwa-mem.nix b/tools/bwa-mem.nix
index 2b3bc64..1427b49 100644
--- a/tools/bwa-mem.nix
+++ b/tools/bwa-mem.nix
@@ -1,5 +1,4 @@
{ bionix
-, nixpkgs
, ref
, bamOutput ? true
, flags ? null
@@ -10,18 +9,18 @@
, input2 ? null
}:
-with nixpkgs;
+with bionix;
with lib;
-with bionix.types;
-with bionix.compression;
+with types;
+with compression;
let
fa = f: matchFiletype "bwa-ref" { fa = _: f; } f;
fq = f: matchFiletype "bwa-input" { fq = _: f; gz = matchFiletype' "bwa-input" { fq = _: f; }; } f;
-in stdenv.mkDerivation {
+in stage {
name = "bwa-mem";
- buildInputs = [ bwa bc ] ++ optional bamOutput samtools;
+ buildInputs = with pkgs; [ bwa bc ] ++ optional bamOutput samtools;
buildCommand = ''
ln -s ${fa ref} ref.fa
for f in ${bionix.bwa.index indexAttrs ref}/* ; do