1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, pkg-config
, qtbase
, qtimageformats
, qtwebengine
, qtx11extras
, libarchive
, libXdmcp
, libpthreadstubs
, wrapQtAppsHook
, xcbutilkeysyms
}:
let
isQt5 = lib.versions.major qtbase.version == "5";
in
stdenv.mkDerivation (finalAttrs: {
pname = "zeal";
version = "0.6.1.20230907"; # unstable-date format not suitable for cmake
src = fetchFromGitHub {
owner = "zealdocs";
repo = "zeal";
rev = "20249153077964d01c7c36b9f4042a40e8c8fbf1";
hash = "sha256-AyfpMq0R0ummTGvyUHOh/XBUeVfkFwo1VyyLSGoTN8w=";
};
# we only need this if we are using a version that hasn't been released. We
# could also match on the "VERSION x.y.z" bit but then it would have to be
# updated based on whatever is the latest release, so instead just rewrite the
# line.
postPatch = ''
sed -i CMakeLists.txt \
-e 's@^project.*@project(Zeal VERSION ${finalAttrs.version})@'
'' + lib.optionalString (!isQt5) ''
substituteInPlace src/app/CMakeLists.txt \
--replace "COMPONENTS Widgets" "COMPONENTS Widgets QmlIntegration"
'';
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
wrapQtAppsHook
];
buildInputs = [
libXdmcp
libarchive
libpthreadstubs
qtbase
qtimageformats
qtwebengine
xcbutilkeysyms
]
++ lib.optionals isQt5 [ qtx11extras ];
meta = {
description = "A simple offline API documentation browser";
longDescription = ''
Zeal is a simple offline API documentation browser inspired by Dash (macOS
app), available for Linux and Windows.
'';
homepage = "https://zealdocs.org/";
changelog = "https://github.com/zealdocs/zeal/releases";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ skeidel peterhoeg AndersonTorres ];
inherit (qtbase.meta) platforms;
};
})
|