tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
kiwix: 0.9 -> 2.0.5
ajs124
4 years ago
cbac34be
9478a316
+87
-93
3 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
kiwix
default.nix
lib.nix
top-level
all-packages.nix
+31
-92
pkgs/applications/misc/kiwix/default.nix
···
1
1
-
{ lib, stdenv, fetchurl, makeWrapper, pkg-config
2
2
-
, zip, python, zlib, which, icu, libmicrohttpd, lzma, aria2, wget, bc
3
3
-
, libuuid, libX11, libXext, libXt, libXrender, glib, dbus, dbus-glib
4
4
-
, gtk2, gdk-pixbuf, pango, cairo, freetype, fontconfig, alsaLib, atk, cmake
5
5
-
, xapian, ctpp2, zimlib
1
1
+
{ lib, mkDerivation, fetchFromGitHub
2
2
+
, callPackage
3
3
+
, pkg-config
4
4
+
, makeWrapper
5
5
+
, qmake
6
6
+
, qtbase
7
7
+
, qtwebengine
8
8
+
, qtsvg
9
9
+
, qtimageformats
10
10
+
, aria2
6
11
}:
7
12
8
8
-
with lib;
13
13
+
mkDerivation rec {
14
14
+
pname = "kiwix";
15
15
+
version = "2.0.5";
9
16
10
10
-
let
11
11
-
xulrunner64_tar = fetchurl {
12
12
-
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-x86_64.tar.bz2";
13
13
-
sha256 = "0i3m30gm5z7qmas14id6ypvbmnb2k7jhz8aby2wz5vvv49zqmx3s";
14
14
-
};
15
15
-
xulrunnersdk64_tar = fetchurl {
16
16
-
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-x86_64.sdk.tar.bz2";
17
17
-
sha256 = "0z90v7c4mq15g5klmsj8vs2r10fbygj3qzynx4952hkv8ihw8n3a";
18
18
-
};
19
19
-
xulrunner32_tar = fetchurl {
20
20
-
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-i686.tar.bz2";
21
21
-
sha256 = "0yln6pxz8f6b9wm9124sx049z8mgi17lgd63rcv2hnix825y8gjb";
22
22
-
};
23
23
-
xulrunnersdk32_tar = fetchurl {
24
24
-
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-i686.sdk.tar.bz2";
25
25
-
sha256 = "1h9vcbvf8wgds6i2z20y7krpys0mqsqhv1ijyfljanp6vyll9fvi";
17
17
+
src = fetchFromGitHub {
18
18
+
owner = pname;
19
19
+
repo = "${pname}-desktop";
20
20
+
rev = version;
21
21
+
sha256 = "12v43bcg4g8fcp02y2srsfdvcb7dpl4pxb9z7a235006s0kfv8yn";
26
22
};
27
23
28
28
-
xulrunner = if stdenv.hostPlatform.system == "x86_64-linux"
29
29
-
then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; }
30
30
-
else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; };
24
24
+
nativeBuildInputs = [
25
25
+
qmake
26
26
+
pkg-config
27
27
+
];
31
28
32
32
-
pugixml = stdenv.mkDerivation rec {
33
33
-
version = "1.2";
34
34
-
pname = "pugixml";
35
35
-
36
36
-
src = fetchurl {
37
37
-
url = "http://download.kiwix.org/dev/${pname}-${version}.tar.gz";
38
38
-
sha256 = "0sqk0vdwjq44jxbbkj1cy8qykrmafs1sickzldb2w2nshsnjshhg";
39
39
-
};
40
40
-
41
41
-
nativeBuildInputs = [ cmake ];
42
42
-
43
43
-
unpackPhase = ''
44
44
-
# not a nice src archive: all the files are in the root :(
45
45
-
mkdir ${pname}-${version}
46
46
-
cd ${pname}-${version}
47
47
-
tar -xf ${src}
48
48
-
49
49
-
# and the build scripts are in there :'(
50
50
-
cd scripts
51
51
-
'';
52
52
-
};
53
53
-
54
54
-
in
55
55
-
56
56
-
stdenv.mkDerivation rec {
57
57
-
pname = "kiwix";
58
58
-
version = "0.9";
59
59
-
60
60
-
src = fetchurl {
61
61
-
url = "http://download.kiwix.org/src/kiwix-${version}-src.tar.xz";
62
62
-
sha256 = "0577phhy2na59cpcqjgldvksp0jwczyg0l6c9ghnr19i375l7yqc";
63
63
-
};
64
64
-
65
65
-
nativeBuildInputs = [ pkg-config ];
66
29
buildInputs = [
67
67
-
zip python zlib xapian which icu libmicrohttpd
68
68
-
lzma zimlib ctpp2 aria2 wget bc libuuid makeWrapper pugixml
30
30
+
qtbase
31
31
+
qtwebengine
32
32
+
qtsvg
33
33
+
qtimageformats
34
34
+
(callPackage ./lib.nix {})
69
35
];
70
36
71
71
-
postUnpack = ''
72
72
-
cd kiwix*
73
73
-
mkdir static
74
74
-
cp Makefile.in static/
75
75
-
76
76
-
cd src/dependencies
77
77
-
78
78
-
tar -xf ${xulrunner.tar}
79
79
-
tar -xf ${xulrunner.sdk}
80
80
-
81
81
-
cd ../../..
82
82
-
'';
83
83
-
84
84
-
configureFlags = [
85
85
-
"--disable-staticbins"
37
37
+
qtWrapperArgs = [
38
38
+
"--prefix PATH : ${lib.makeBinPath [ aria2 ]}"
86
39
];
87
40
88
88
-
postInstall = ''
89
89
-
cp -r src/dependencies/xulrunner $out/lib/kiwix
90
90
-
91
91
-
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/lib/kiwix/xulrunner/xulrunner
92
92
-
93
93
-
rm $out/bin/kiwix
94
94
-
makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
95
95
-
--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]} \
96
96
-
--suffix PATH : ${aria2}/bin
97
97
-
'';
98
98
-
99
99
-
meta = {
41
41
+
meta = with lib; {
100
42
description = "An offline reader for Web content";
101
43
homepage = "https://kiwix.org";
102
44
license = licenses.gpl3;
103
45
platforms = platforms.linux;
104
104
-
maintainers = with maintainers; [ robbinch ];
105
105
-
knownVulnerabilities = [
106
106
-
"CVE-2015-1032"
107
107
-
];
46
46
+
maintainers = with maintainers; [ ajs124 ];
108
47
};
109
48
}
+55
pkgs/applications/misc/kiwix/lib.nix
···
1
1
+
{ stdenv, lib, fetchFromGitHub
2
2
+
, meson, ninja, pkg-config
3
3
+
, python3
4
4
+
, curl
5
5
+
, icu
6
6
+
, pugixml
7
7
+
, zimlib
8
8
+
, zlib
9
9
+
, libmicrohttpd
10
10
+
, mustache-hpp
11
11
+
, gtest
12
12
+
}:
13
13
+
14
14
+
15
15
+
stdenv.mkDerivation rec {
16
16
+
pname = "kiwix-lib";
17
17
+
version = "9.4.1";
18
18
+
19
19
+
src = fetchFromGitHub {
20
20
+
owner = "kiwix";
21
21
+
repo = pname;
22
22
+
rev = version;
23
23
+
sha256 = "034nk6l623v78clrs2d0k1vg69sbzrd8c0q79qiqmlkinck1nkxw";
24
24
+
};
25
25
+
26
26
+
nativeBuildInputs = [
27
27
+
meson
28
28
+
ninja
29
29
+
pkg-config
30
30
+
python3
31
31
+
];
32
32
+
33
33
+
buildInputs = [
34
34
+
icu
35
35
+
zlib
36
36
+
mustache-hpp
37
37
+
];
38
38
+
39
39
+
propagatedBuildInputs = [
40
40
+
curl
41
41
+
libmicrohttpd
42
42
+
pugixml
43
43
+
zimlib
44
44
+
];
45
45
+
46
46
+
checkInputs = [
47
47
+
gtest
48
48
+
];
49
49
+
50
50
+
doCheck = true;
51
51
+
52
52
+
postPatch = ''
53
53
+
patchShebangs scripts
54
54
+
'';
55
55
+
}
+1
-1
pkgs/top-level/all-packages.nix
···
23683
23683
ffmpeg = ffmpeg_2;
23684
23684
};
23685
23685
23686
23686
-
kiwix = callPackage ../applications/misc/kiwix { };
23686
23686
+
kiwix = libsForQt5.callPackage ../applications/misc/kiwix { };
23687
23687
23688
23688
klayout = libsForQt5.callPackage ../applications/misc/klayout { };
23689
23689