diff options
author | Justin Bedo <cu@cua0.org> | 2021-10-29 17:39:01 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2021-10-29 17:39:01 +1100 |
commit | bac9248a5e08e8afdf5485a6e27cfe72e1ca5090 (patch) | |
tree | 8719a280b56122017d46b582cd3da8547dd3f548 /tools/compression.nix | |
parent | ab809b8c77efdad9fb54d3591a0193a1cbe888d1 (diff) |
treewide reformatting and simplification
- simplify with statix
- reformat with nixpkgs-fmt
Diffstat (limited to 'tools/compression.nix')
-rw-r--r-- | tools/compression.nix | 75 |
1 files changed, 42 insertions, 33 deletions
diff --git a/tools/compression.nix b/tools/compression.nix index bfcc292..c9c8777 100644 --- a/tools/compression.nix +++ b/tools/compression.nix @@ -1,4 +1,4 @@ -{bionix}: +{ bionix }: with bionix; with types; @@ -8,42 +8,51 @@ let gunzip = callBionixE ./compression-gunzip.nix; bunzip2 = callBionixE ./compression-bunzip2.nix; -in { - uncompress = attrs: f: matchFiletype "uncompress" { - fa = _: f; - fq = _: f; - bam = _: f; - sam = _: f; - cram = _: f; - vcf = _: f; - bed = _: f; - gz = _: gunzip attrs f; - bz2 = _: bunzip2 attrs f; - } f; +in +{ + uncompress = attrs: f: matchFiletype "uncompress" + { + fa = _: f; + fq = _: f; + bam = _: f; + sam = _: f; + cram = _: f; + vcf = _: f; + bed = _: f; + gz = _: gunzip attrs f; + bz2 = _: bunzip2 attrs f; + } + f; gzip = attrs: f: let gz = gzip attrs f; - in types.matchFiletype "compressed" { - fa = _: gz; - fq = _: gz; - bam = _: gz; - sam = _: gz; - cram = _: gz; - vcf = _: gz; - bed = _: gz; - gz = x: x; - } f; + in + types.matchFiletype "compressed" + { + fa = _: gz; + fq = _: gz; + bam = _: gz; + sam = _: gz; + cram = _: gz; + vcf = _: gz; + bed = _: gz; + gz = x: x; + } + f; bzip2 = attrs: f: let bz2 = bzip2 attrs f; - in types.matchFiletype "compressed" { - fa = _: gz; - fq = _: gz; - bam = _: gz; - sam = _: gz; - cram = _: gz; - vcf = _: gz; - bed = _: gz; - bz2 = x: x; - } f; + in + types.matchFiletype "compressed" + { + fa = _: gz; + fq = _: gz; + bam = _: gz; + sam = _: gz; + cram = _: gz; + vcf = _: gz; + bed = _: gz; + bz2 = x: x; + } + f; } |