From c3babc9eb65dc8c56d07ce8a6ee0d8c03bbd223e Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 9 Jan 2019 16:38:42 +1100 Subject: large refactor - use bionix.pkgs instead of nixpkgs - replace stdenv.mkDerivation with stage --- tools/samtools-view.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tools/samtools-view.nix') diff --git a/tools/samtools-view.nix b/tools/samtools-view.nix index b791534..e1ca0a8 100644 --- a/tools/samtools-view.nix +++ b/tools/samtools-view.nix @@ -1,5 +1,4 @@ { bionix -, nixpkgs , nameSort ? false , flags ? null , outfmt ? null @@ -7,9 +6,9 @@ input: -with nixpkgs; +with bionix; with lib; -with bionix.types; +with types; assert (matchFiletype "samtools-view" { bam = _: true; sam = _: true; cram = _: true; } input); @@ -17,9 +16,9 @@ let outfmtR = if outfmt != null then outfmt input else input.filetype; fa = ref: matchFiletype "samtools-view-ref" { fa = _: ref; } ref; outfmtFlags = matchFiletype "samtools-view-outfmt" { bam = _: "-O BAM"; sam = _: "-O SAM"; cram = x: "-O CRAM -T ${fa x.ref}"; } {filetype = outfmtR;}; -in stdenv.mkDerivation { +in stage { name = "samtools-view"; - buildInputs = [ samtools ]; + buildInputs = with pkgs; [ samtools ]; buildCommand = '' samtools view ${outfmtFlags} ${optionalString (flags != null) flags} ${input} > $out ''; -- cgit v1.2.3