summary refs log tree commit diff
path: root/pkgs/data/documentation/zeal/default.nix
blob: 8c806b87d4b225e0fd3f6ce1e40ab361564c03e7 (plain) (blame)
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
{ lib, fetchFromGitHub, cmake, extra-cmake-modules, pkg-config
, qtbase, qtimageformats, qtwebengine, qtx11extras, mkDerivation
, libarchive, libXdmcp, libpthreadstubs, xcbutilkeysyms  }:

mkDerivation rec {
  pname = "zeal";
  version = "0.6.999";

  src = fetchFromGitHub {
    owner = "zealdocs";
    repo = "zeal";
    rev = "1ce0e2e446232e7647c5588c1f603f1dd88e0f67";
    sha256 = "0gj5qcm7ck8m5zfmiabay2f7wbxldmrkw8m3xi7v9i8y8hx0jkxr";
  };

  # 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})@'
  '';

  nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ];

  buildInputs = [
    qtbase qtimageformats qtwebengine qtx11extras
    libarchive
    libXdmcp libpthreadstubs xcbutilkeysyms
  ];

  meta = with lib; {
    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/";
    license = licenses.gpl3;
    maintainers = with maintainers; [ skeidel peterhoeg ];
    platforms = platforms.linux;
  };
}