Finish zims move and update vim config

Alter the vim-cmp bindings so that it's nicer to me and to selections
Finish updating the Zim packages with their hash values
This commit is contained in:
Greg Hellings
2024-10-12 17:32:32 -05:00
parent 7510136304
commit 26a10f1b86
3 changed files with 49 additions and 412 deletions
+11 -13
View File
@@ -7,23 +7,21 @@
}:
let
inherit (lib.attrsets) mapAttrs mapAttrsRecursiveCond;
# Converts the inputs from the file into a fetchurl command
# Converts the inputs from the file into a fetchtorrent command
zim =
type: val:
fetchtorrent {
inherit (val) hash;
(fetchtorrent {
inherit (val) hash name;
url = "https://download.kiwix.org/zim/${type}/${val.name}.torrent";
curlOptsList = [ "-L" ];
};
# Uses the function above to convert the JSON into a structure of fetchurl derivations
zims = mapAttrs (_: types: (mapAttrs (type: hash: zim type hash) types)) (
builtins.fromJSON (builtins.readFile ./zim/blobs.json)
);
# Turns the fetchurl derivations into a list of strings, copying the results into a final output
});
rawZims = builtins.fromJSON (builtins.readFile ./zim/blobs.json);
# Uses the function above to convert the JSON into a structure of fetchtorrent derivations
zims = mapAttrs (_: types: (mapAttrs (type: info: zim type info) types)) (rawZims);
# Turns the fetchtorrent derivations into a list of strings, copying the results into a final output
copies = builtins.concatStringsSep "\n" (
lib.attrsets.collect builtins.isString (
mapAttrsRecursiveCond (as: !(lib.attrsets.isDerivation as)) # don't recurse derivations
(_: v: "cp ${v} $out/") # copy derivation to destination
(_: v: "ln -s ${v} $out/") # copy derivation to destination
zims
)
);
@@ -33,7 +31,7 @@ stdenv.mkDerivation {
version = "2024-10";
passthru = {
inherit zims;
inherit zims rawZims;
updater = (callPackage ./zim/updater.nix { });
};
@@ -42,6 +40,6 @@ stdenv.mkDerivation {
# Collect all the zim files into a single folder derivation
installPhase = ''
mkdir -p $out
echo "${copies}" > $out/derp.txt
${copies}
'';
}
+1 -382
View File
@@ -1,382 +1 @@
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": ""
}
}
}
{"en":{"gutenberg":{"name":"gutenberg_en_all_2023-08.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"phet":{"name":"phet_en_all_2023-04.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikibooks":{"name":"wikibooks_en_all_maxi_2021-03.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikipedia":{"name":"wikipedia_en_all_maxi_2024-01.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikisource":{"name":"wikisource_en_all_maxi_2022-09.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikiversity":{"name":"wikiversity_en_all_maxi_2021-03.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wiktionary":{"name":"wiktionary_en_all_nopic_2024-05.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="}},"fr":{"gutenberg":{"name":"gutenberg_fr_all_2023-08.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"phet":{"name":"phet_fr_all_2023-04.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikibooks":{"name":"wikibooks_fr_all_maxi_2024-06.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikipedia":{"name":"wikipedia_fr_all_maxi_2024-05.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikisource":{"name":"wikisource_fr_all_maxi_2022-04.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikiversity":{"name":"wikiversity_fr_all_maxi_2021-02.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wiktionary":{"name":"wiktionary_fr_all_nopic_2024-06.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="}},"ht":{"phet":{"name":"phet_ht_all_2023-04.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikipedia":{"name":"wikipedia_ht_all_maxi_2024-06.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="},"wikisource":{"name":"wikisource_ht_all_maxi_2019-03.zim","hash":"sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="}}}