nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 ninja,
7 meson,
8 pkg-config,
9 gobject-introspection,
10 gtk-doc,
11 docbook-xsl-nons,
12 docbook_xml_dtd_43,
13 glib,
14 gtk3,
15 graphene,
16 libepoxy,
17 json-glib,
18}:
19
20stdenv.mkDerivation rec {
21 pname = "gthree";
22 version = "0.9.0";
23
24 outputs = [
25 "out"
26 "dev"
27 "devdoc"
28 ];
29
30 src = fetchFromGitHub {
31 owner = "alexlarsson";
32 repo = "gthree";
33 rev = version;
34 sha256 = "09fcnjc3j21lh5fjf067wm35sb4qni4vgzing61kixnn2shy79iy";
35 };
36
37 patches = [
38 # Add option for disabling examples
39 (fetchpatch {
40 url = "https://github.com/alexlarsson/gthree/commit/75f05c40aba9d5f603d8a3c490c3406c1fe06776.patch";
41 sha256 = "PBwLz4DLhC+7BtypVTFMFiF3hKAJeskU3XBKFHa3a84=";
42 })
43 ];
44
45 nativeBuildInputs = [
46 ninja
47 meson
48 pkg-config
49 gtk-doc
50 docbook-xsl-nons
51 docbook_xml_dtd_43
52 gobject-introspection
53 ];
54
55 buildInputs = [
56 libepoxy
57 json-glib
58 ];
59
60 propagatedBuildInputs = [
61 glib
62 gtk3
63 graphene
64 ];
65
66 mesonFlags = [
67 "-Dgtk_doc=${if stdenv.hostPlatform.isDarwin then "false" else "true"}"
68 # Data for examples is useless when the example programs are not installed.
69 "-Dexamples=false"
70 ];
71
72 meta = with lib; {
73 description = "GObject/GTK port of three.js";
74 homepage = "https://github.com/alexlarsson/gthree";
75 license = licenses.mit;
76 maintainers = [ ];
77 platforms = platforms.unix;
78 broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gthree.x86_64-darwin
79 };
80}