summary refs log tree commit diff
path: root/pkgs/development/libraries/gthree/default.nix
blob: 04d7c8d8f4d4d020c75fb8f546235dbaf45821b7 (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
{ stdenv
, fetchFromGitHub
, fetchpatch
, ninja
, meson
, pkgconfig
, gobject-introspection
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_43
, glib
, gtk3
, graphene
, epoxy
, json-glib
}:

stdenv.mkDerivation rec {
  pname = "gthree";
  version = "0.2.0";

  outputs = [ "out" "dev" "devdoc" ];

  src = fetchFromGitHub {
    owner = "alexlarsson";
    repo = "gthree";
    rev = version;
    sha256 = "16ap1ampnzsyhrs84b168d6889lh8sjr2j5sqv9mdbnnhy72p5cd";
  };

  nativeBuildInputs = [
    ninja
    meson
    pkgconfig
    gtk-doc
    docbook_xsl
    docbook_xml_dtd_43
    gobject-introspection
  ];

  buildInputs = [
    epoxy
  ];

  propagatedBuildInputs = [
    glib
    gtk3
    graphene
    json-glib
  ];

  mesonFlags = [
    "-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}"
  ];

  meta = with stdenv.lib; {
    description = "GObject/GTK port of three.js";
    homepage = "https://github.com/alexlarsson/gthree";
    license = licenses.mit;
    maintainers = with maintainers; [ jtojnar ];
    platforms = platforms.unix;
  };
}