about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gthree/default.nix
blob: f8e50f384590ea9451a3eaa1b0fe14ebfffcdfb9 (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
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, ninja
, meson
, pkg-config
, gobject-introspection
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_43
, glib
, gtk3
, graphene
, libepoxy
, json-glib
}:

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

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

  src = fetchFromGitHub {
    owner = "alexlarsson";
    repo = "gthree";
    rev = version;
    sha256 = "09fcnjc3j21lh5fjf067wm35sb4qni4vgzing61kixnn2shy79iy";
  };

  patches = [
    # Add option for disabling examples
    (fetchpatch {
      url = "https://github.com/alexlarsson/gthree/commit/75f05c40aba9d5f603d8a3c490c3406c1fe06776.patch";
      sha256 = "PBwLz4DLhC+7BtypVTFMFiF3hKAJeskU3XBKFHa3a84=";
    })
  ];

  nativeBuildInputs = [
    ninja
    meson
    pkg-config
    gtk-doc
    docbook-xsl-nons
    docbook_xml_dtd_43
    gobject-introspection
  ];

  buildInputs = [
    libepoxy
    json-glib
  ];

  propagatedBuildInputs = [
    glib
    gtk3
    graphene
  ];

  mesonFlags = [
    "-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}"
    # Data for examples is useless when the example programs are not installed.
    "-Dexamples=false"
  ];

  meta = with lib; {
    description = "GObject/GTK port of three.js";
    homepage = "https://github.com/alexlarsson/gthree";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
    platforms = platforms.unix;
    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gthree.x86_64-darwin
  };
}