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";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "zeal";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.6.1.20230320";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-07-18 16:06:22 +00:00
|
|
|
owner = "zealdocs";
|
|
|
|
repo = "zeal";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "a617ae5e06b95cec99bae058650e55b98613916d";
|
|
|
|
hash = "sha256-WL2uqA0sZ5Q3lZIA9vkLVyfec/jBkfGcWb6XQ7AuM94=";
|
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
|
|
|
|
2023-04-12 12:48:02 +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
|
|
|
};
|
|
|
|
}
|