aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-11-20 16:32:28 +1100
committerJustin Bedo <cu@cua0.org>2018-11-20 16:34:17 +1100
commit90dd48b019ff7bf9e74d202c1deace6a0896cde5 (patch)
tree83cf7768175f4c2e96288406f7415571fad59c65 /default.nix
parent5ad075658eea3d783bac013aae476dd22a371e71 (diff)
Add some typed fetchurl functions
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index f835fa0..50b85a3 100644
--- a/default.nix
+++ b/default.nix
@@ -1,6 +1,8 @@
{nixpkgs ? import <nixpkgs> {}}:
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