1{stdenv, lib, vala, meson, ninja, pkg-config, fetchFromGitea, gobject-introspection, glib, gtk3, libgflow}:
2
3stdenv.mkDerivation rec {
4 pname = "libgtkflow3";
5 version = "1.0.6";
6
7 outputs = [ "out" "dev" "devdoc" ];
8 outputBin = "devdoc"; # demo app
9
10 src = fetchFromGitea {
11 domain = "notabug.org";
12 owner = "grindhold";
13 repo = "libgtkflow";
14 rev = "gtkflow3_${version}";
15 hash = "sha256-JoVq7U5JQ3pRxptR7igWFw7lcBTsgr3aVXxayLqhyFo=";
16 };
17
18 nativeBuildInputs = [
19 vala
20 meson
21 ninja
22 pkg-config
23 gobject-introspection
24 ];
25
26 buildInputs = [
27 gtk3
28 glib
29 libgflow
30 ];
31
32 postFixup = ''
33 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
34 moveToOutput "share/doc" "$devdoc"
35 '';
36
37 mesonFlags = [
38 "-Denable_valadoc=true"
39 "-Denable_gtk4=false"
40 "-Denable_gflow=false"
41 ];
42
43 postPatch = ''
44 rm -r libgflow
45 '';
46
47 meta = with lib; {
48 description = "Flow graph widget for GTK 3";
49 homepage = "https://notabug.org/grindhold/libgtkflow";
50 maintainers = with maintainers; [ grindhold ];
51 license = licenses.lgpl3Plus;
52 platforms = platforms.unix;
53 };
54}