Update zims
This commit is contained in:
+16
-4
@@ -2,7 +2,7 @@
|
|||||||
callPackage,
|
callPackage,
|
||||||
fetchtorrent,
|
fetchtorrent,
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenvNoCC,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -10,9 +10,21 @@ let
|
|||||||
# Converts the inputs from the file into a fetchtorrent command
|
# Converts the inputs from the file into a fetchtorrent command
|
||||||
zim =
|
zim =
|
||||||
type: val:
|
type: val:
|
||||||
(fetchtorrent {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
inherit (val) hash name;
|
inherit (val) name;
|
||||||
|
src = (
|
||||||
|
fetchtorrent {
|
||||||
|
inherit (val) hash;
|
||||||
url = "https://download.kiwix.org/zim/${type}/${val.name}.torrent";
|
url = "https://download.kiwix.org/zim/${type}/${val.name}.torrent";
|
||||||
|
backend = "rqbit";
|
||||||
|
postUnpack = "ls -lR";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
phases = [ "installPhase" ];
|
||||||
|
installPhase = ''
|
||||||
|
ls -lR ${finalAttrs.src}
|
||||||
|
cp ${finalAttrs.src} $out
|
||||||
|
'';
|
||||||
});
|
});
|
||||||
rawZims = builtins.fromJSON (builtins.readFile ./zim/blobs.json);
|
rawZims = builtins.fromJSON (builtins.readFile ./zim/blobs.json);
|
||||||
# Uses the function above to convert the JSON into a structure of fetchtorrent derivations
|
# Uses the function above to convert the JSON into a structure of fetchtorrent derivations
|
||||||
@@ -26,7 +38,7 @@ let
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
name = "zims";
|
name = "zims";
|
||||||
version = "2024-10";
|
version = "2024-10";
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -5,7 +5,7 @@
|
|||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"phet": {
|
"phet": {
|
||||||
"name": "phet_en_all_2023-04.zim",
|
"name": "phet_en_all_2025-03.zim",
|
||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikibooks": {
|
"wikibooks": {
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikiversity": {
|
"wikiversity": {
|
||||||
"name": "wikiversity_en_all_maxi_2021-03.zim",
|
"name": "wikiversity_en_all_maxi_2025-05.zim",
|
||||||
"hash": "sha256-w/3J2neHPWbz1kK2qR0OB64mkwuDI7RJMuoAWz9yyZs="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wiktionary": {
|
"wiktionary": {
|
||||||
"name": "wiktionary_en_all_nopic_2024-05.zim",
|
"name": "wiktionary_en_all_nopic_2024-05.zim",
|
||||||
@@ -35,19 +35,19 @@
|
|||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"phet": {
|
"phet": {
|
||||||
"name": "phet_fr_all_2023-04.zim",
|
"name": "phet_fr_all_2025-03.zim",
|
||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikibooks": {
|
"wikibooks": {
|
||||||
"name": "wikibooks_fr_all_maxi_2024-06.zim",
|
"name": "wikibooks_fr_all_maxi_2025-06.zim",
|
||||||
"hash": "sha256-w/3J2neHPWbz1kK2qR0OB64mkwuDI7RJMuoAWz9yyZs="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikipedia": {
|
"wikipedia": {
|
||||||
"name": "wikipedia_fr_all_maxi_2024-05.zim",
|
"name": "wikipedia_fr_all_maxi_2024-05.zim",
|
||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikisource": {
|
"wikisource": {
|
||||||
"name": "wikisource_fr_all_maxi_2022-04.zim",
|
"name": "wikisource_fr_all_maxi_2025-06.zim",
|
||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikiversity": {
|
"wikiversity": {
|
||||||
@@ -55,17 +55,17 @@
|
|||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wiktionary": {
|
"wiktionary": {
|
||||||
"name": "wiktionary_fr_all_nopic_2024-06.zim",
|
"name": "wiktionary_fr_all_nopic_2025-03.zim",
|
||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ht": {
|
"ht": {
|
||||||
"phet": {
|
"phet": {
|
||||||
"name": "phet_ht_all_2023-04.zim",
|
"name": "phet_ht_all_2025-03.zim",
|
||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikipedia": {
|
"wikipedia": {
|
||||||
"name": "wikipedia_ht_all_maxi_2024-06.zim",
|
"name": "wikipedia_ht_all_maxi_2025-05.zim",
|
||||||
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
"hash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="
|
||||||
},
|
},
|
||||||
"wikisource": {
|
"wikisource": {
|
||||||
|
|||||||
+2
-1
@@ -87,6 +87,7 @@ func getHash(ch chan result, file, category, language string) {
|
|||||||
fmt.Sprintf(`fetchtorrent {
|
fmt.Sprintf(`fetchtorrent {
|
||||||
url="%s/%s/%s.torrent";
|
url="%s/%s/%s.torrent";
|
||||||
hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||||
|
backend="rqbit";
|
||||||
}`, BASE, category, file),
|
}`, BASE, category, file),
|
||||||
)
|
)
|
||||||
out, err := cmd.Output()
|
out, err := cmd.Output()
|
||||||
@@ -144,6 +145,6 @@ func main() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret, _ := json.Marshal(output)
|
ret, _ := json.MarshalIndent(output, " ", "")
|
||||||
fmt.Println(string(ret))
|
fmt.Println(string(ret))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user