Merge pull request #117851 from helsinki-systems/upd/kiwix
kiwix: fix and update
This commit is contained in:
commit
1297f27d50
@ -1,109 +1,48 @@
|
|||||||
{ lib, stdenv, fetchurl, makeWrapper, pkg-config
|
{ lib, mkDerivation, fetchFromGitHub
|
||||||
, zip, python, zlib, which, icu, libmicrohttpd, lzma, aria2, wget, bc
|
, callPackage
|
||||||
, libuuid, libX11, libXext, libXt, libXrender, glib, dbus, dbus-glib
|
, pkg-config
|
||||||
, gtk2, gdk-pixbuf, pango, cairo, freetype, fontconfig, alsaLib, atk, cmake
|
, makeWrapper
|
||||||
, xapian, ctpp2, zimlib
|
, qmake
|
||||||
|
, qtbase
|
||||||
|
, qtwebengine
|
||||||
|
, qtsvg
|
||||||
|
, qtimageformats
|
||||||
|
, aria2
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
mkDerivation rec {
|
||||||
|
|
||||||
let
|
|
||||||
xulrunner64_tar = fetchurl {
|
|
||||||
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-x86_64.tar.bz2";
|
|
||||||
sha256 = "0i3m30gm5z7qmas14id6ypvbmnb2k7jhz8aby2wz5vvv49zqmx3s";
|
|
||||||
};
|
|
||||||
xulrunnersdk64_tar = fetchurl {
|
|
||||||
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-x86_64.sdk.tar.bz2";
|
|
||||||
sha256 = "0z90v7c4mq15g5klmsj8vs2r10fbygj3qzynx4952hkv8ihw8n3a";
|
|
||||||
};
|
|
||||||
xulrunner32_tar = fetchurl {
|
|
||||||
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-i686.tar.bz2";
|
|
||||||
sha256 = "0yln6pxz8f6b9wm9124sx049z8mgi17lgd63rcv2hnix825y8gjb";
|
|
||||||
};
|
|
||||||
xulrunnersdk32_tar = fetchurl {
|
|
||||||
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-i686.sdk.tar.bz2";
|
|
||||||
sha256 = "1h9vcbvf8wgds6i2z20y7krpys0mqsqhv1ijyfljanp6vyll9fvi";
|
|
||||||
};
|
|
||||||
|
|
||||||
xulrunner = if stdenv.hostPlatform.system == "x86_64-linux"
|
|
||||||
then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; }
|
|
||||||
else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; };
|
|
||||||
|
|
||||||
pugixml = stdenv.mkDerivation rec {
|
|
||||||
version = "1.2";
|
|
||||||
pname = "pugixml";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "http://download.kiwix.org/dev/${pname}-${version}.tar.gz";
|
|
||||||
sha256 = "0sqk0vdwjq44jxbbkj1cy8qykrmafs1sickzldb2w2nshsnjshhg";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
|
||||||
|
|
||||||
unpackPhase = ''
|
|
||||||
# not a nice src archive: all the files are in the root :(
|
|
||||||
mkdir ${pname}-${version}
|
|
||||||
cd ${pname}-${version}
|
|
||||||
tar -xf ${src}
|
|
||||||
|
|
||||||
# and the build scripts are in there :'(
|
|
||||||
cd scripts
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "kiwix";
|
pname = "kiwix";
|
||||||
version = "0.9";
|
version = "2.0.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "http://download.kiwix.org/src/kiwix-${version}-src.tar.xz";
|
owner = pname;
|
||||||
sha256 = "0577phhy2na59cpcqjgldvksp0jwczyg0l6c9ghnr19i375l7yqc";
|
repo = "${pname}-desktop";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "12v43bcg4g8fcp02y2srsfdvcb7dpl4pxb9z7a235006s0kfv8yn";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [
|
||||||
|
qmake
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
zip python zlib xapian which icu libmicrohttpd
|
qtbase
|
||||||
lzma zimlib ctpp2 aria2 wget bc libuuid makeWrapper pugixml
|
qtwebengine
|
||||||
|
qtsvg
|
||||||
|
qtimageformats
|
||||||
|
(callPackage ./lib.nix {})
|
||||||
];
|
];
|
||||||
|
|
||||||
postUnpack = ''
|
qtWrapperArgs = [
|
||||||
cd kiwix*
|
"--prefix PATH : ${lib.makeBinPath [ aria2 ]}"
|
||||||
mkdir static
|
|
||||||
cp Makefile.in static/
|
|
||||||
|
|
||||||
cd src/dependencies
|
|
||||||
|
|
||||||
tar -xf ${xulrunner.tar}
|
|
||||||
tar -xf ${xulrunner.sdk}
|
|
||||||
|
|
||||||
cd ../../..
|
|
||||||
'';
|
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
"--disable-staticbins"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
meta = with lib; {
|
||||||
cp -r src/dependencies/xulrunner $out/lib/kiwix
|
|
||||||
|
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/lib/kiwix/xulrunner/xulrunner
|
|
||||||
|
|
||||||
rm $out/bin/kiwix
|
|
||||||
makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
|
|
||||||
--suffix LD_LIBRARY_PATH : ${makeLibraryPath [stdenv.cc.cc libX11 libXext libXt libXrender glib dbus dbus-glib gtk2 gdk-pixbuf pango cairo freetype fontconfig alsaLib atk]} \
|
|
||||||
--suffix PATH : ${aria2}/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "An offline reader for Web content";
|
description = "An offline reader for Web content";
|
||||||
homepage = "https://kiwix.org";
|
homepage = "https://kiwix.org";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ robbinch ];
|
maintainers = with maintainers; [ ajs124 ];
|
||||||
knownVulnerabilities = [
|
|
||||||
"CVE-2015-1032"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
55
pkgs/applications/misc/kiwix/lib.nix
Normal file
55
pkgs/applications/misc/kiwix/lib.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{ stdenv, lib, fetchFromGitHub
|
||||||
|
, meson, ninja, pkg-config
|
||||||
|
, python3
|
||||||
|
, curl
|
||||||
|
, icu
|
||||||
|
, pugixml
|
||||||
|
, zimlib
|
||||||
|
, zlib
|
||||||
|
, libmicrohttpd
|
||||||
|
, mustache-hpp
|
||||||
|
, gtest
|
||||||
|
}:
|
||||||
|
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "kiwix-lib";
|
||||||
|
version = "9.4.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "kiwix";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "034nk6l623v78clrs2d0k1vg69sbzrd8c0q79qiqmlkinck1nkxw";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
python3
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
icu
|
||||||
|
zlib
|
||||||
|
mustache-hpp
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
curl
|
||||||
|
libmicrohttpd
|
||||||
|
pugixml
|
||||||
|
zimlib
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
gtest
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs scripts
|
||||||
|
'';
|
||||||
|
}
|
26
pkgs/development/libraries/mustache-hpp/default.nix
Normal file
26
pkgs/development/libraries/mustache-hpp/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "mustache";
|
||||||
|
version = "4.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "kainjow";
|
||||||
|
repo = "Mustache";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0r9rbk6v1wpld2ismfsk2lkhbyv3dkf0p03hkjivbj05qkfhvlbb";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/include
|
||||||
|
cp ../mustache.hpp $out/include
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Mustache text templates for modern C++";
|
||||||
|
homepage = "https://github.com/kainjow/Mustache";
|
||||||
|
license = licenses.boost;
|
||||||
|
};
|
||||||
|
}
|
@ -1,23 +1,55 @@
|
|||||||
{ lib, stdenv, fetchurl, lzma }:
|
{ lib, stdenv, fetchFromGitHub
|
||||||
|
, meson, ninja, pkg-config
|
||||||
|
, python3
|
||||||
|
, icu
|
||||||
|
, libuuid
|
||||||
|
, xapian
|
||||||
|
, xz
|
||||||
|
, zstd
|
||||||
|
, gtest
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "zimlib";
|
pname = "zimlib";
|
||||||
version = "1.4";
|
version = "6.3.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "http://www.openzim.org/download/${pname}-${version}.tar.gz";
|
owner = "openzim";
|
||||||
sha256 = "14ra3iq42x53k1nqxb5lsg4gadlkpkgv6cbjjl6305ajmbrghcdq";
|
repo = "libzim";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "0iy0f1clhihq277x218ccx3mszgpr3h9l0by48b9ykr115nffw3s";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ lzma ];
|
nativeBuildInputs = [
|
||||||
|
meson
|
||||||
|
pkg-config
|
||||||
|
ninja
|
||||||
|
python3
|
||||||
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
propagatedBuildInputs = [
|
||||||
|
icu
|
||||||
|
libuuid
|
||||||
|
xapian
|
||||||
|
xz
|
||||||
|
zstd
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs scripts
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
gtest
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Library for reading and writing ZIM files";
|
description = "Library for reading and writing ZIM files";
|
||||||
homepage = "https://www.openzim.org/wiki/Zimlib";
|
homepage = "https://www.openzim.org/wiki/Zimlib";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ robbinch ];
|
maintainers = with maintainers; [ ajs124 ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, automake, autoconf, libtool
|
|
||||||
, zimlib, cxxtools, tntnet
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "zimreader-0.92";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "wikimedia";
|
|
||||||
repo = "openzim";
|
|
||||||
rev = "r1.3"; # there multiple tools with different version in the repo
|
|
||||||
sha256 = "0x529137rxy6ld64xqa6xmn93121ripxvkf3sc7hv3wg6km182sw";
|
|
||||||
};
|
|
||||||
|
|
||||||
patchFlags = [ "-p2" ];
|
|
||||||
patches = [
|
|
||||||
(fetchpatch {
|
|
||||||
name = "zimreader_tntnet221.patch";
|
|
||||||
url = "https://github.com/wikimedia/openzim/compare/r1.3...juliendehos:3ee5f11eaa811284d340451e6f466529c00f6ef2.patch";
|
|
||||||
sha256 = "0rc5n20svyyndqh7hsynjyblfraphgi0f6khw6f5jq89w9i1j1hd";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
buildInputs = [ automake autoconf libtool zimlib cxxtools tntnet ];
|
|
||||||
setSourceRoot = ''
|
|
||||||
sourceRoot=$(echo */zimreader)
|
|
||||||
'';
|
|
||||||
preConfigure = "./autogen.sh";
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "A tool to serve ZIM files using HTTP";
|
|
||||||
homepage = "http://git.wikimedia.org/log/openzim";
|
|
||||||
license = lib.licenses.gpl2;
|
|
||||||
maintainers = with lib.maintainers; [ robbinch juliendehos ];
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
|
||||||
}
|
|
@ -827,6 +827,7 @@ mapAliases ({
|
|||||||
ytop = throw "ytop has been abandoned by upstream. Consider switching to bottom instead";
|
ytop = throw "ytop has been abandoned by upstream. Consider switching to bottom instead";
|
||||||
yubikey-neo-manager = throw "yubikey-neo-manager has been removed because it was broken. Use yubikey-manager-qt instead."; # added 2021-03-08
|
yubikey-neo-manager = throw "yubikey-neo-manager has been removed because it was broken. Use yubikey-manager-qt instead."; # added 2021-03-08
|
||||||
yuzu = yuzu-mainline; # added 2021-01-25
|
yuzu = yuzu-mainline; # added 2021-01-25
|
||||||
|
zimreader = throw "zimreader has been removed from nixpkgs as it has been replaced by kiwix-serve and stopped working with modern zimlib versions."; # added 2021-03-28
|
||||||
zdfmediathk = mediathekview; # added 2019-01-19
|
zdfmediathk = mediathekview; # added 2019-01-19
|
||||||
gnome_user_docs = gnome-user-docs; # added 2019-11-20
|
gnome_user_docs = gnome-user-docs; # added 2019-11-20
|
||||||
# spidermonkey is not ABI upwards-ompatible, so only allow this for nix-shell
|
# spidermonkey is not ABI upwards-ompatible, so only allow this for nix-shell
|
||||||
|
@ -9573,8 +9573,6 @@ in
|
|||||||
zinnia = callPackage ../tools/inputmethods/zinnia { };
|
zinnia = callPackage ../tools/inputmethods/zinnia { };
|
||||||
tegaki-zinnia-japanese = callPackage ../tools/inputmethods/tegaki-zinnia-japanese { };
|
tegaki-zinnia-japanese = callPackage ../tools/inputmethods/tegaki-zinnia-japanese { };
|
||||||
|
|
||||||
zimreader = callPackage ../tools/text/zimreader { };
|
|
||||||
|
|
||||||
zimwriterfs = callPackage ../tools/text/zimwriterfs { };
|
zimwriterfs = callPackage ../tools/text/zimwriterfs { };
|
||||||
|
|
||||||
par = callPackage ../tools/text/par { };
|
par = callPackage ../tools/text/par { };
|
||||||
@ -21182,6 +21180,8 @@ in
|
|||||||
|
|
||||||
mustache-go = callPackage ../development/tools/mustache-go { };
|
mustache-go = callPackage ../development/tools/mustache-go { };
|
||||||
|
|
||||||
|
mustache-hpp = callPackage ../development/libraries/mustache-hpp { };
|
||||||
|
|
||||||
myrica = callPackage ../data/fonts/myrica { };
|
myrica = callPackage ../data/fonts/myrica { };
|
||||||
|
|
||||||
nafees = callPackage ../data/fonts/nafees { };
|
nafees = callPackage ../data/fonts/nafees { };
|
||||||
@ -23747,7 +23747,7 @@ in
|
|||||||
ffmpeg = ffmpeg_2;
|
ffmpeg = ffmpeg_2;
|
||||||
};
|
};
|
||||||
|
|
||||||
kiwix = callPackage ../applications/misc/kiwix { };
|
kiwix = libsForQt5.callPackage ../applications/misc/kiwix { };
|
||||||
|
|
||||||
klayout = libsForQt5.callPackage ../applications/misc/klayout { };
|
klayout = libsForQt5.callPackage ../applications/misc/klayout { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user