nftable-migration
 1{
 2  python3,
 3  lib,
 4  makeWrapper,
 5  fzf,
 6  aria2,
 7  wget,
 8}:
 9
10python3.pkgs.buildPythonApplication {
11  pname = "download-kiwix-zim";
12  version = "1.0.0";
13  format = "other";
14
15  src = ./.;
16
17  nativeBuildInputs = [ makeWrapper ];
18
19  # Runtime dependencies
20  buildInputs = [
21    fzf
22    aria2
23    wget
24  ];
25
26  installPhase = ''
27    mkdir -p $out/bin
28
29    # Install the script
30    cp download-kiwix-zim $out/bin/download-kiwix-zim
31    chmod +x $out/bin/download-kiwix-zim
32
33    # Wrap the script to ensure dependencies are in PATH
34    wrapProgram $out/bin/download-kiwix-zim \
35      --prefix PATH : ${
36        lib.makeBinPath [
37          fzf
38          aria2
39          wget
40        ]
41      }
42  '';
43
44  meta = with lib; {
45    description = "Browse and download ZIM files from the Kiwix library using fzf";
46    longDescription = ''
47      Interactive tool to browse the Kiwix catalog and download offline
48      content archives (ZIM files) for Wikipedia and other educational
49      resources. Features multi-select with fzf and parallel downloads
50      with aria2c.
51    '';
52    platforms = platforms.unix;
53  };
54}