aboutsummaryrefslogtreecommitdiff
path: root/tools/samtools-sort.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/samtools-sort.nix
parent9fd618d0305d4927c8d86fc37238d1216e401967 (diff)
large refactor
- use bionix.pkgs instead of nixpkgs - replace stdenv.mkDerivation with stage
Diffstat (limited to 'tools/samtools-sort.nix')
-rw-r--r--tools/samtools-sort.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/samtools-sort.nix b/tools/samtools-sort.nix
index 37df5c8..6f9eb33 100644
--- a/tools/samtools-sort.nix
+++ b/tools/samtools-sort.nix
@@ -1,5 +1,4 @@
{ bionix
-, nixpkgs
, nameSort ? false
, flags ? null
, outfmt ? null
@@ -7,7 +6,7 @@
input:
-with nixpkgs;
+with bionix;
with lib;
let
@@ -20,9 +19,9 @@ let
outfmtR = if outfmt != null then outfmt input else input.filetype;
outFmtFlags = matchFiletype "samtools-sort-outfmt" { bam = _: "-O BAM"; sam = _: "-O SAM"; cram = ref: "-O CRAM -T ${ref}"; } {filetype = outfmtR;};
alreadySorted = matchFileSorting "samtools-sort" { name = _: nameSort; coord = _: !nameSort; none = _: false;} input;
-in stdenv.mkDerivation {
+in pkgs.stdenv.mkDerivation {
name = "samtools-sort";
- buildInputs = [ samtools ];
+ buildInputs = with pkgs; [ samtools ];
buildCommand =
if alreadySorted then
"ln -s ${input} $out"