Move zims to their own package

Instead of manually downloading the Zim files with a torrent directly,
move them into an actual derivation so it can easily be built into the
resulting images. Also, write an updater script that can automatically
download the files, determine the latest versions for each type and each
language, and generate the hash key values for them
This commit is contained in:
Greg Hellings
2024-10-12 10:39:03 -05:00
parent b7b3df1987
commit 7510136304
5 changed files with 597 additions and 0 deletions
+382
View File
@@ -0,0 +1,382 @@
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
error:
<borked>
at «none»:0: (source not available)
in the left operand of the update (//) operator
at /nix/store/3hh72ymqzdmlxzw39zgmadigibrqv7wl-nix-prefetch-0.4.1/lib/nix-prefetch/prelude.nix:3:46:
2|
3| let prelude = with prelude; import ./lib.nix // {
| ^
4| fetcher = if orig.fetcher == null || elem orig.fetcher.type [ "file" "attr" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
{
"en": {
"wikipedia": {
"name": "wikipedia_en_all_maxi_2024-01.zim",
"hash": ""
},
"wiktionary": {
"name": "wiktionary_en_all_nopic_2024-05.zim",
"hash": ""
},
"wikiversity": {
"name": "wikiversity_en_all_maxi_2021-03.zim",
"hash": ""
},
"wikibooks": {
"name": "wikibooks_en_all_maxi_2021-03.zim",
"hash": ""
},
"wikisource": {
"name": "wikisource_en_all_maxi_2022-09.zim",
"hash": ""
},
"phet": {
"name": "phet_en_all_2023-04.zim",
"hash": ""
},
"gutenberg": {
"name": "gutenberg_en_all_2023-08.zim",
"hash": ""
}
},
"fr": {
"wikipedia": {
"name": "wikipedia_fr_all_maxi_2024-05.zim",
"hash": ""
},
"wiktionary": {
"name": "wiktionary_fr_all_nopic_2024-06.zim",
"hash": ""
},
"wikiversity": {
"name": "wikiversity_fr_all_maxi_2021-02.zim",
"hash": ""
},
"wikibooks": {
"name": "wikibooks_fr_all_maxi_2024-06.zim",
"hash": ""
},
"wikisource": {
"name": "wikisource_fr_all_maxi_2022-04.zim",
"hash": ""
},
"phet": {
"name": "phet_fr_all_2023-04.zim",
"hash": ""
},
"gutenberg": {
"name": "gutenberg_fr_all_2023-08.zim",
"hash": ""
}
},
"ht": {
"wikipedia": {
"name": "wikipedia_ht_all_maxi_2024-06.zim",
"hash": ""
},
"wikisource": {
"name": "wikisource_ht_all_maxi_2019-03.zim",
"hash": ""
},
"phet": {
"name": "phet_ht_all_2023-04.zim",
"hash": ""
}
}
}