2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-08-21 22:50:14 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, ninja
|
|
|
|
, meson
|
2020-08-11 22:20:18 +01:00
|
|
|
, pkg-config
|
2019-08-21 22:50:14 +01:00
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
2020-08-11 22:20:18 +01:00
|
|
|
, docbook-xsl-nons
|
2019-08-21 22:50:14 +01:00
|
|
|
, docbook_xml_dtd_43
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, graphene
|
|
|
|
, epoxy
|
|
|
|
, json-glib
|
|
|
|
}:
|
|
|
|
|
2019-09-09 12:36:49 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-21 22:50:14 +01:00
|
|
|
pname = "gthree";
|
2020-08-11 22:20:18 +01:00
|
|
|
version = "0.9.0";
|
2019-08-21 22:50:14 +01:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexlarsson";
|
|
|
|
repo = "gthree";
|
2019-09-09 12:36:49 +01:00
|
|
|
rev = version;
|
2020-08-11 22:20:18 +01:00
|
|
|
sha256 = "09fcnjc3j21lh5fjf067wm35sb4qni4vgzing61kixnn2shy79iy";
|
2019-08-21 22:50:14 +01:00
|
|
|
};
|
|
|
|
|
2020-08-11 22:20:18 +01:00
|
|
|
patches = [
|
|
|
|
# Add option for disabling examples
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/alexlarsson/gthree/commit/75f05c40aba9d5f603d8a3c490c3406c1fe06776.patch";
|
|
|
|
sha256 = "PBwLz4DLhC+7BtypVTFMFiF3hKAJeskU3XBKFHa3a84=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-08-21 22:50:14 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
ninja
|
|
|
|
meson
|
2020-08-11 22:20:18 +01:00
|
|
|
pkg-config
|
2019-08-21 22:50:14 +01:00
|
|
|
gtk-doc
|
2020-08-11 22:20:18 +01:00
|
|
|
docbook-xsl-nons
|
2019-08-21 22:50:14 +01:00
|
|
|
docbook_xml_dtd_43
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
epoxy
|
2020-08-11 22:20:18 +01:00
|
|
|
json-glib
|
2019-08-21 22:50:14 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
graphene
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}"
|
2020-08-11 22:20:18 +01:00
|
|
|
# Data for examples is useless when the example programs are not installed.
|
|
|
|
"-Dexamples=false"
|
2019-08-21 22:50:14 +01:00
|
|
|
];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-08-21 22:50:14 +01:00
|
|
|
description = "GObject/GTK port of three.js";
|
2019-09-09 12:36:49 +01:00
|
|
|
homepage = "https://github.com/alexlarsson/gthree";
|
2019-08-21 22:50:14 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|