2022-11-27 09:42:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, pkg-config
|
|
|
|
, qtbase
|
|
|
|
, qtimageformats
|
|
|
|
, qtwebengine
|
|
|
|
, qtx11extras ? null # qt5 only
|
|
|
|
, libarchive
|
|
|
|
, libXdmcp
|
|
|
|
, libpthreadstubs
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, xcbutilkeysyms
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
let
|
|
|
|
isQt5 = lib.versions.major qtbase.version == "5";
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "zeal";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.6.20221022";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-07-18 16:06:22 +00:00
|
|
|
owner = "zealdocs";
|
|
|
|
repo = "zeal";
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "7ea03e4bb9754020e902a2989f56f4bc42b85c82";
|
|
|
|
sha256 = "sha256-BozRLlws56i9P7Qtc5qPZWgJR5yhYqnLQsEdsymt5us=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# 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 ${version})@'
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config wrapQtAppsHook ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
qtbase
|
|
|
|
qtimageformats
|
|
|
|
qtwebengine
|
|
|
|
libarchive
|
|
|
|
libXdmcp
|
|
|
|
libpthreadstubs
|
|
|
|
xcbutilkeysyms
|
|
|
|
] ++ lib.optionals isQt5 [ qtx11extras ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
|
|
|
'';
|
2020-07-18 16:06:22 +00:00
|
|
|
homepage = "https://zealdocs.org/";
|
|
|
|
license = licenses.gpl3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ skeidel peterhoeg ];
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|