From 90dd48b019ff7bf9e74d202c1deace6a0896cde5 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Tue, 20 Nov 2018 16:32:28 +1100 Subject: Add some typed fetchurl functions --- default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/default.nix b/default.nix index f835fa0..50b85a3 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,8 @@ {nixpkgs ? import {}}: let + inherit (nixpkgs) fetchurl; + bionix = nixpkgs.lib.makeExtensible (self: let callBionix = file: attrs: import file ({ bionix = self; nixpkgs = nixpkgs; } // attrs); in with self; { @@ -29,5 +31,12 @@ let def = f: defs: attrs: f (defs // attrs); defQsub = qsubAttrs: f: defs: qsubAttr qsubAttrs (def f defs); + # Fetching files of specific type + fetchFastQ = attrs: with types; tagFiletype (filetype.fq {}) (fetchurl attrs); + fetchFastA = attrs: with types; tagFiletype (filetype.fa {}) (fetchurl attrs); + fetchFastQGZ = attrs: with types; tagFiletype (filetype.gz (filetype.fq {})) (fetchurl attrs); + fetchFastAGZ = attrs: with types; tagFiletype (filetype.gz (filetype.fa {})) (fetchurl attrs); + + }); in bionix -- cgit v1.2.3