Commit f45dd595 authored by colin's avatar colin
Browse files

kiwix-tools: init at 3.4.0

this provides the `kiwix-serve` tool asked for in
<https://github.com/NixOS/nixpkgs/issues/35009>,
but does not implement the systemd service requested.

package contents:
- bin/kiwix-manage
- bin/kiwix-search
- bin/kiwix-serve

tested by invoking `kiwix-serve` and connecting to it in a web browser:

```sh
nix build '.#kiwix-tools'
wget 'https://dumps.wikimedia.org/other/kiwix/zim/wikipedia/wikipedia_en_simple_all_mini_2022-11.zim'
./result/bin/kiwix-serve -p 1080 ./wikipedia_en_simple_all_mini_2022-11.zim
curl http://localhost:1080
```
parent fa9cc1b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ mkDerivation rec {
  meta = with lib; {
    description = "An offline reader for Web content";
    homepage = "https://kiwix.org";
    license = licenses.gpl3;
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ ajs124 ];
  };
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
  meta = with lib; {
    description = "Common code base for all Kiwix ports";
    homepage = "https://kiwix.org";
    license = licenses.gpl3;
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ colinsane ];
  };
+41 −0
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, icu
, libkiwix
, meson
, ninja
, pkg-config
, stdenv
}:

stdenv.mkDerivation rec {
  pname = "kiwix-tools";
  version = "3.4.0";

  src = fetchFromGitHub {
    owner = "kiwix";
    repo = "kiwix-tools";
    rev = version;
    sha256 = "sha256-r3/aTH/YoDuYpKLPakP4toS3OtiRueTUjmR34rdmr+w=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
  ];

  buildInputs = [
    icu
    libkiwix
  ];

  meta = with lib; {
    description = "Command line Kiwix tools: kiwix-serve, kiwix-manage, ...";
    homepage = "https://kiwix.org";
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ colinsane ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -29952,6 +29952,8 @@ with pkgs;
  kiwix = libsForQt5.callPackage ../applications/misc/kiwix { };
  kiwix-tools = callPackage ../applications/misc/kiwix/tools.nix { };
  klayout = libsForQt5.callPackage ../applications/misc/klayout { };
  klee = callPackage ../applications/science/logic/klee (with llvmPackages_11; {