aboutsummaryrefslogtreecommitdiff
path: root/tools/bowtie-align.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/bowtie-align.nix
parent9fd618d0305d4927c8d86fc37238d1216e401967 (diff)
large refactor
- use bionix.pkgs instead of nixpkgs - replace stdenv.mkDerivation with stage
Diffstat (limited to 'tools/bowtie-align.nix')
-rw-r--r--tools/bowtie-align.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/bowtie-align.nix b/tools/bowtie-align.nix
index 456747a..67a1169 100644
--- a/tools/bowtie-align.nix
+++ b/tools/bowtie-align.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 "bowtie2-ref" { fa = _: f; } f;
fq = f: matchFiletype "bowtie2-input" { fq = _: f; gz = matchFiletype' "bowtie2-input" { fq = _: f; }; } f;
-in stdenv.mkDerivation {
+in stage {
name = "bowtie2-align";
- buildInputs = [ bowtie2 bc ] ++ optional bamOutput samtools;
+ buildInputs = with pkgs; [ bowtie2 bc ] ++ optional bamOutput samtools;
buildCommand = ''
cores=$(echo $NIX_BUILD_CORES ${optionalString bamOutput "- 1"} | bc)
if [[ $cores -lt 1 ]] ; then