Commit 3e9099f2 authored by Nick Cao's avatar Nick Cao Committed by Peter Hoeg
Browse files
parent 2a0146ff
Loading
Loading
Loading
Loading
+7 −19
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, cmake
, extra-cmake-modules
, pkg-config
@@ -22,30 +21,15 @@ let
in
stdenv.mkDerivation (finalAttrs: {
  pname = "zeal";
  version = "0.7.0";
  version = "0.7.1";

  src = fetchFromGitHub {
    owner = "zealdocs";
    repo = "zeal";
    rev = "v${finalAttrs.version}";
    hash = "sha256-s1FaazHVtWE697BO0hIOgZVowdkq68R9x327ZnJRnlo=";
    hash = "sha256-918hWy5be5mHINLbFJPiE29wlL1kRUD4MS3AjML/6fs=";
  };

  patches = [
    # fix build with qt 6.6.0
    # treewide: replace deprecated qAsConst with std::as_const()
    # https://github.com/zealdocs/zeal/pull/1565
    (fetchpatch2 {
      url = "https://github.com/zealdocs/zeal/commit/d50a0115d58df2b222ede4c3a76b9686f4716465.patch";
      hash = "sha256-Ub6RCZGpLSOjvK17Jrm+meZuZGXcC4kI3QYl5HbsLWU=";
    })
  ];

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace 'ZEAL_VERSION_SUFFIX "-dev"' 'ZEAL_VERSION_SUFFIX ""'
  '';

  nativeBuildInputs = [
    cmake
    extra-cmake-modules
@@ -64,6 +48,10 @@ stdenv.mkDerivation (finalAttrs: {
  ]
  ++ lib.optionals isQt5 [ qtx11extras ];

  cmakeFlags = [
    (lib.cmakeBool "ZEAL_RELEASE_BUILD" true)
  ];

  meta = {
    description = "Simple offline API documentation browser";
    longDescription = ''
@@ -71,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
      app), available for Linux and Windows.
    '';
    homepage = "https://zealdocs.org/";
    changelog = "https://github.com/zealdocs/zeal/releases";
    changelog = "https://github.com/zealdocs/zeal/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ peterhoeg AndersonTorres ];
    mainProgram = "zeal";