nixpkgs/pkgs/applications/misc/kiwix/default.nix
colin f45dd59576 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
```
2023-01-13 05:07:17 +00:00

48 lines
816 B
Nix

{ lib, mkDerivation, fetchFromGitHub
, libkiwix
, pkg-config
, qmake
, qtbase
, qtwebengine
, qtsvg
, qtimageformats
, aria2
}:
mkDerivation rec {
pname = "kiwix";
version = "2.3.1";
src = fetchFromGitHub {
owner = pname;
repo = "${pname}-desktop";
rev = version;
sha256 = "sha256-ghx4pW6IkWPzZXk0TtMGeQZIzm9HEN3mR4XQFJ1xHDo=";
};
nativeBuildInputs = [
qmake
pkg-config
];
buildInputs = [
libkiwix
qtbase
qtwebengine
qtsvg
qtimageformats
];
qtWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ aria2 ]}"
];
meta = with lib; {
description = "An offline reader for Web content";
homepage = "https://kiwix.org";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ajs124 ];
};
}