From 54b3620029d1c2b127d4e1eb222ec2b1bc412e75 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 15 Oct 2025 23:13:06 -0500 Subject: [PATCH] Make the things better Use transmission, which is not broken Bump supposed version of zim meta package Provide better passing of arguments to updater --- pkgs/zim.nix | 4 ++-- pkgs/zim/updater.go | 4 ++++ pkgs/zim/updater.nix | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/zim.nix b/pkgs/zim.nix index 873089a..4ccf719 100644 --- a/pkgs/zim.nix +++ b/pkgs/zim.nix @@ -16,7 +16,7 @@ let fetchtorrent { inherit (val) hash; url = "https://download.kiwix.org/zim/${type}/${val.name}.torrent"; - backend = "rqbit"; + backend = "transmission"; postUnpack = "ls -lR"; } ); @@ -40,7 +40,7 @@ let in stdenvNoCC.mkDerivation { name = "zims"; - version = "2024-10"; + version = "2025-10"; passthru = { inherit zims rawZims; diff --git a/pkgs/zim/updater.go b/pkgs/zim/updater.go index eb3a349..864469a 100644 --- a/pkgs/zim/updater.go +++ b/pkgs/zim/updater.go @@ -87,6 +87,7 @@ func getHash(ch chan result, file, category, language string) { "--option", "extra-experimental-features", "flakes", + "--check-store", fmt.Sprintf(`fetchtorrent { url="%s/%s/%s.torrent"; hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; @@ -147,6 +148,8 @@ func main() { } } + fmt.Println("Writing file to ", outputPath) + // Read existing cache if it exists cached := make(map[string]map[string]Zim) if data, err := os.ReadFile(outputPath); err == nil { @@ -221,4 +224,5 @@ func main() { } fmt.Printf("Successfully wrote output to %s\n", outputPath) + fmt.Println(string(ret)) } diff --git a/pkgs/zim/updater.nix b/pkgs/zim/updater.nix index 0d4ead9..cbdb526 100644 --- a/pkgs/zim/updater.nix +++ b/pkgs/zim/updater.nix @@ -16,6 +16,7 @@ writeShellApplication { nix-prefetch ]; text = '' - go run ${goscript} -- pkgs/zim/blobs.json + go build -o updater ${goscript} + ./updater "$@" ''; }