diff options
Diffstat (limited to 'nixpkgs/pkgs/data/documentation/zeal/default.nix')
-rw-r--r-- | nixpkgs/pkgs/data/documentation/zeal/default.nix | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/data/documentation/zeal/default.nix b/nixpkgs/pkgs/data/documentation/zeal/default.nix index de3d7638eb9b..36f0dda5165e 100644 --- a/nixpkgs/pkgs/data/documentation/zeal/default.nix +++ b/nixpkgs/pkgs/data/documentation/zeal/default.nix @@ -1,16 +1,33 @@ -{ lib, fetchFromGitHub, cmake, extra-cmake-modules, pkg-config -, qtbase, qtimageformats, qtwebengine, qtx11extras, mkDerivation -, libarchive, libXdmcp, libpthreadstubs, xcbutilkeysyms }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, extra-cmake-modules +, pkg-config +, qtbase +, qtimageformats +, qtwebengine +, qtx11extras ? null # qt5 only +, libarchive +, libXdmcp +, libpthreadstubs +, wrapQtAppsHook +, xcbutilkeysyms +}: -mkDerivation rec { +let + isQt5 = lib.versions.major qtbase.version == "5"; + +in +stdenv.mkDerivation rec { pname = "zeal"; - version = "0.6.999"; + version = "0.6.1.20230320"; src = fetchFromGitHub { owner = "zealdocs"; repo = "zeal"; - rev = "763edca12ccd6c67e51f10891d1ced8b2510904f"; - sha256 = "sha256-1/wQXkRWvpRia8UDvvvmzHinPG8q2Tz9Uoeegej9uC8="; + rev = "a617ae5e06b95cec99bae058650e55b98613916d"; + hash = "sha256-WL2uqA0sZ5Q3lZIA9vkLVyfec/jBkfGcWb6XQ7AuM94="; }; # we only need this if we are using a version that hasn't been released. We @@ -20,15 +37,22 @@ mkDerivation rec { postPatch = '' sed -i CMakeLists.txt \ -e 's@^project.*@project(Zeal VERSION ${version})@' + '' + lib.optionalString (!isQt5) '' + substituteInPlace src/app/CMakeLists.txt \ + --replace "COMPONENTS Widgets" "COMPONENTS Widgets QmlIntegration" ''; - nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ]; + nativeBuildInputs = [ cmake extra-cmake-modules pkg-config wrapQtAppsHook ]; buildInputs = [ - qtbase qtimageformats qtwebengine qtx11extras + qtbase + qtimageformats + qtwebengine libarchive - libXdmcp libpthreadstubs xcbutilkeysyms - ]; + libXdmcp + libpthreadstubs + xcbutilkeysyms + ] ++ lib.optionals isQt5 [ qtx11extras ]; meta = with lib; { description = "A simple offline API documentation browser"; |