about summary refs log tree commit diff
path: root/pkgs/applications/graphics/dia/default.nix
blob: c79f50e86d799f547a32092d1524bf801d244cd1 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ lib
, stdenv
, fetchFromGitLab
, appstream-glib
, dblatex
, desktop-file-utils
, graphene
, gtk3
, gtk-mac-integration-gtk3
, intltool
, libxml2
, libxslt
, meson
, ninja
, pkg-config
, poppler
, python3
, wrapGAppsHook
  # Building with docs are still failing in unstable-2023-09-28
, withDocs ? false
}:

stdenv.mkDerivation {
  pname = "dia";
  version = "unstable-2023-09-28";

  src = fetchFromGitLab {
    owner = "GNOME";
    repo = "dia";
    domain = "gitlab.gnome.org";
    rev = "bd551bb2558dcc89bc0bf7b4dd85b38cd85ad322";
    hash = "sha256-U+8TUE1ULt6MNxnvw9kFjCAVBecUy2Sarof6H9+kR7Q=";
  };

  # Required for the PDF plugin when building with clang.
  CXXFLAGS = "-std=c++17";

  preConfigure = ''
    patchShebangs .
  '';

  buildInputs = [
    graphene
    gtk3
    libxml2
    python3
    poppler
  ] ++
  lib.optionals withDocs [
    libxslt
  ] ++
  lib.optionals stdenv.isDarwin [
    gtk-mac-integration-gtk3
  ];

  nativeBuildInputs = [
    appstream-glib
    desktop-file-utils
    intltool
    meson
    ninja
    pkg-config
    wrapGAppsHook
  ] ++
  lib.optionals withDocs [
    dblatex
  ];

  meta = with lib; {
    description = "Gnome Diagram drawing software";
    mainProgram = "dia";
    homepage = "http://live.gnome.org/Dia";
    maintainers = with maintainers; [ raskin ];
    license = licenses.gpl2;
    platforms = platforms.unix;
  };
}