3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/gthree/default.nix

74 lines
1.4 KiB
Nix
Raw Normal View History

2019-08-21 22:50:14 +01:00
{ stdenv
, 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
}:
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";
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
];
meta = with stdenv.lib; {
description = "GObject/GTK port of three.js";
homepage = "https://github.com/alexlarsson/gthree";
2019-08-21 22:50:14 +01:00
license = licenses.mit;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}