This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1{ 2 run, 3 lib, 4 curl, 5}: 6 7let 8 mkFetcher = 9 command: 10 { 11 url, 12 name ? builtins.baseNameOf url, 13 hash ? lib.fakeHash, 14 }: 15 run { 16 inherit name url; 17 outputHashMode = "nar"; 18 outputHashAlgo = "sha256"; 19 outputHash = hash; 20 path = [ curl ]; 21 } command; 22in 23 24rec { 25 file = mkFetcher '' 26 curl -L "$url" -o $out 27 ''; 28 tar = mkFetcher '' 29 mkdir $out 30 case "$url" in 31 *gz) decompress=-z ;; 32 *bz2) decompress=-j ;; 33 *xz) decompress=-J ;; 34 *lz) decompress=--lzma ;; 35 *) decompress= ;; 36 esac 37 curl -L "$url" | tar -x $decompress -C $out --strip-components=1 38 ''; 39 zip = mkFetcher '' 40 mkdir $out 41 curl -L "$url" | unzip - -d $out 42 ''; 43 github = 44 { 45 owner, 46 repo, 47 rev, 48 ... 49 }@args: 50 tar ( 51 { 52 url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; 53 name = "${owner}-${repo}-${builtins.baseNameOf rev}"; 54 } 55 // removeAttrs args [ 56 "url" 57 "owner" 58 "repo" 59 "rev" 60 ] 61 ); 62}