git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #67222 from jtojnar/glthree

gnome-hexgl: init at unstable-2019-08-21

commitb99256545578ce745f6a45f1421753718d144066 authorJan Tojnar <jtojnar@gmail.com> dateThu 22 Aug 2019, 03:18 (7 years ago) parentf96fdd880354ee
6 files changed+201−44
pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch+38−41 pkgs/development/libraries/graphene/default.nix+8−3 pkgs/development/libraries/gthree/default.nix+72 pkgs/development/libraries/mutest/default.nix+34 pkgs/games/gnome-hexgl/default.nix+43 pkgs/top-level/all-packages.nix+6
pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch+38−41
@@ -1,34 +1,31 @@
1−From c550bf4a41e9f86351b0a65ea3d6c9ab616e27c0 Mon Sep 17 00:00:00 2001
1+From 2bf6614a6d7516e194e39eb691c05b486860153c Mon Sep 17 00:00:00 2001
22From: worldofpeace <worldofpeace@protonmail.ch>
33Date: Thu, 16 May 2019 21:15:15 -0400
44Subject: [PATCH] meson: add options for tests installation dirs
55
66---
7− meson_options.txt | 6 ++++++
8− src/tests/meson.build | 19 ++++++++++++++-----
7+ meson_options.txt | 6 ++++++
8+ tests/meson.build | 19 ++++++++++++++-----
99 2 files changed, 20 insertions(+), 5 deletions(-)
1010
1111diff --git a/meson_options.txt b/meson_options.txt
12−index c938805..c1e9e95 100644
12+index 578bdae..6f5fa23 100644
1313--- a/meson_options.txt
1414+++ b/meson_options.txt
15−@@ -19,6 +19,12 @@ option('arm_neon', type: 'boolean',
16− option('tests', type: 'boolean',
15+@@ -22,3 +22,9 @@ option('tests', type: 'boolean',
16+ option('installed_tests', type: 'boolean',
1717 value: true,
18− description: 'Build the test suite (requires GObject)')
18+ description: 'Install tests')
1919+option('installed_test_datadir', type: 'string',
2020+ value: '',
2121+ description: 'Installation directory for data files in tests')
2222+option('installed_test_bindir', type: 'string',
2323+ value: '',
2424+ description: 'Installation directory for binary files in tests')
25− option('benchmarks', type: 'boolean',
26− value: true,
27− description: 'Build the benchmarks suite (requires GObject)')
28−diff --git a/src/tests/meson.build b/src/tests/meson.build
29−index 62129c6..0186400 100644
30−--- a/src/tests/meson.build
31−+++ b/src/tests/meson.build
25+diff --git a/tests/meson.build b/tests/meson.build
26+index 1f9bd0e..0253ac3 100644
27+--- a/tests/meson.build
28++++ b/tests/meson.build
3229@@ -22,8 +22,17 @@ unit_tests = [
3330 python = python3.find_python()
3431 gen_installed_test = join_paths(meson.current_source_dir(), 'gen-installed-test.py')
@@ -47,33 +44,33 @@ index 62129c6..0186400 100644
4744+ test_bindir = join_paths(get_option('prefix'), get_option('libexecdir'), test_suffix)
4845+endif
4946
50− foreach unit: unit_tests
51− wrapper = '@0@.test'.format(unit)
52−@@ -32,13 +41,13 @@ foreach unit: unit_tests
53− command: [
54− python,
55− gen_installed_test,
56−- '--testdir=@0@'.format(installed_test_bindir),
57−+ '--testdir=@0@'.format(test_bindir),
58− '--testname=@0@'.format(unit),
59− '--outdir=@OUTDIR@',
60− '--outfile=@0@'.format(wrapper),
61− ],
62− install: true,
63−- install_dir: installed_test_datadir)
64−+ install_dir: test_datadir)
65−
66− exe = executable(unit, unit + '.c',
67− dependencies: graphene_dep,
68−@@ -50,7 +59,7 @@ foreach unit: unit_tests
69− '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
70− ],
71− install: true,
72−- install_dir: installed_test_bindir)
73−+ install_dir: test_bindir)
47+ # Make tests conditional on having mutest-1 installed system-wide, or
48+ # available as a subproject
49+@@ -42,13 +51,13 @@ if mutest_dep.found()
50+ command: [
51+ python,
52+ gen_installed_test,
53+- '--testdir=@0@'.format(installed_test_bindir),
54++ '--testdir=@0@'.format(test_bindir),
55+ '--testname=@0@'.format(unit),
56+ '--outdir=@OUTDIR@',
57+ '--outfile=@0@'.format(wrapper),
58+ ],
59+ install: get_option('installed_tests'),
60+- install_dir: installed_test_datadir,
61++ install_dir: test_datadir,
62+ )
7463
75− test(unit, exe, args: [ '--tap', '-k' ])
76− endforeach
64+ test(unit,
65+@@ -57,7 +66,7 @@ if mutest_dep.found()
66+ include_directories: graphene_inc,
67+ c_args: common_cflags,
68+ install: get_option('installed_tests'),
69+- install_dir: installed_test_bindir,
70++ install_dir: test_bindir,
71+ ),
72+ env: ['MUTEST_OUTPUT=tap'],
73+ protocol: 'tap',
7774--
78−2.21.0
75+2.22.0
7976
pkgs/development/libraries/graphene/default.nix+8−3
@@ -4,6 +4,7 @@
44, meson
55, ninja
66, python3
7+, mutest
78, glib
89, gtk-doc
910, docbook_xsl
@@ -13,7 +14,7 @@
1314
1415stdenv.mkDerivation rec {
1516 pname = "graphene";
16− version = "1.8.6";
17+ version = "1.9.6";
1718
1819 outputs = [ "out" "devdoc" "installedTests" ];
1920
@@ -21,7 +22,7 @@ stdenv.mkDerivation rec {
2122 owner = "ebassi";
2223 repo = pname;
2324 rev = version;
24− sha256 = "1hdbdzcz86jrvsq5h954ph9q62m8jr2a5s5acklxhdkfqn5bkbv8";
25+ sha256 = "0hb7s6g00l7zlf4hlfda55krn0pls9ajz0hcqrh8m656zr18ddwa";
2526 };
2627
2728 patches = [
@@ -41,17 +42,21 @@ stdenv.mkDerivation rec {
4142 meson
4243 ninja
4344 pkgconfig
45+ gobject-introspection
4446 python3
4547 ];
4648
4749 buildInputs = [
50+ glib
4851 gobject-introspection
4952 ];
5053
5154 checkInputs = [
52− glib
55+ mutest
5356 ];
5457
58+ doCheck = true;
59+
5560 meta = with stdenv.lib; {
5661 description = "A thin layer of graphic data types";
5762 homepage = "https://ebassi.github.com/graphene";
pkgs/development/libraries/gthree/default.nixnew file+72
@@ -0,0 +1,72 @@
1+{ stdenv
2+, fetchFromGitHub
3+, fetchpatch
4+, ninja
5+, meson
6+, pkgconfig
7+, gobject-introspection
8+, gtk-doc
9+, docbook_xsl
10+, docbook_xml_dtd_43
11+, glib
12+, gtk3
13+, graphene
14+, epoxy
15+, json-glib
16+}:
17+
18+stdenv.mkDerivation rec {
19+ pname = "gthree";
20+ version = "unstable-2019-08-21";
21+
22+ outputs = [ "out" "dev" "devdoc" ];
23+
24+ src = fetchFromGitHub {
25+ owner = "alexlarsson";
26+ repo = "gthree";
27+ rev = "dac46b0f35e29319c004c7e17b5f345ef4c04cb8";
28+ sha256 = "16ixis2g04000zffm44s7ir64vn3byz9a793g2s76aasqybl86i2";
29+ };
30+
31+ patches = [
32+ # correctly declare json-glib in .pc file
33+ # https://github.com/alexlarsson/gthree/pull/61
34+ (fetchpatch {
35+ url = https://github.com/alexlarsson/gthree/commit/784b1f20e0b6eb15f113a51f74c2cba871249861.patch;
36+ sha256 = "07vxafaxris5a98w751aw04nlw0l45np1lba08xd16wdzmkadz0x";
37+ })
38+ ];
39+
40+ nativeBuildInputs = [
41+ ninja
42+ meson
43+ pkgconfig
44+ gtk-doc
45+ docbook_xsl
46+ docbook_xml_dtd_43
47+ gobject-introspection
48+ ];
49+
50+ buildInputs = [
51+ epoxy
52+ ];
53+
54+ propagatedBuildInputs = [
55+ glib
56+ gtk3
57+ graphene
58+ json-glib
59+ ];
60+
61+ mesonFlags = [
62+ "-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}"
63+ ];
64+
65+ meta = with stdenv.lib; {
66+ description = "GObject/GTK port of three.js";
67+ homepage = https://github.com/alexlarsson/gthree;
68+ license = licenses.mit;
69+ maintainers = with maintainers; [ jtojnar ];
70+ platforms = platforms.unix;
71+ };
72+}
pkgs/development/libraries/mutest/default.nixnew file+34
@@ -0,0 +1,34 @@
1+{ stdenv
2+, fetchFromGitHub
3+, meson
4+, ninja
5+}:
6+
7+stdenv.mkDerivation rec {
8+ pname = "mutest";
9+ version = "unstable-2019-10-12";
10+
11+ outputs = [ "out" "dev" ];
12+
13+ src = fetchFromGitHub {
14+ owner = "ebassi";
15+ repo = "mutest";
16+ rev = "822b5ddf07f957135ba39889d81e513d525b9b8e";
17+ sha256 = "0a5fjdq9p0q5bibqngbbpd9lga0gzrv8yj5wgdfb8ylxzg0jph2p";
18+ };
19+
20+ nativeBuildInputs = [
21+ meson
22+ ninja
23+ ];
24+
25+ doCheck = true;
26+
27+ meta = with stdenv.lib; {
28+ homepage = https://ebassi.github.io/mutest/mutest.md.html;
29+ description = "A BDD testing framework for C, inspired by Mocha";
30+ license = licenses.mit;
31+ maintainers = with maintainers; [ jtojnar worldofpeace ];
32+ platforms = platforms.all;
33+ };
34+}
pkgs/games/gnome-hexgl/default.nixnew file+43
@@ -0,0 +1,43 @@
1+{ stdenv
2+, fetchFromGitHub
3+, ninja
4+, meson
5+, pkgconfig
6+, gthree
7+, gsound
8+, epoxy
9+, gtk3
10+}:
11+
12+stdenv.mkDerivation rec {
13+ pname = "gnome-hexgl";
14+ version = "unstable-2019-08-21";
15+
16+ src = fetchFromGitHub {
17+ owner = "alexlarsson";
18+ repo = "gnome-hexgl";
19+ rev = "c6edde1250b830c7c8ee738905cb39abef67d4a6";
20+ sha256 = "17j236damqij8n4a37psvkfxbbc18yw03s3hs0qxgfhl4671wf6z";
21+ };
22+
23+ nativeBuildInputs = [
24+ ninja
25+ meson
26+ pkgconfig
27+ ];
28+
29+ buildInputs = [
30+ gthree
31+ gsound
32+ epoxy
33+ gtk3
34+ ];
35+
36+ meta = with stdenv.lib; {
37+ description = "Gthree port of HexGL";
38+ homepage = https://github.com/alexlarsson/gnome-hexgl;
39+ license = licenses.mit;
40+ maintainers = with maintainers; [ jtojnar ];
41+ platforms = platforms.unix;
42+ };
43+}
pkgs/top-level/all-packages.nix+6
@@ -1698,6 +1698,8 @@ in
16981698
16991699 gsctl = callPackage ../applications/misc/gsctl { };
17001700
1701+ gthree = callPackage ../development/libraries/gthree { };
1702+
17011703 gti = callPackage ../tools/misc/gti { };
17021704
17031705 hdate = callPackage ../applications/misc/hdate { };
@@ -9493,6 +9495,8 @@ in
94939495
94949496 gnome-desktop-testing = callPackage ../development/tools/gnome-desktop-testing {};
94959497
9498+ gnome-hexgl = callPackage ../games/gnome-hexgl {};
9499+
94969500 gnome-usage = callPackage ../applications/misc/gnome-usage {};
94979501
94989502 gnome-latex = callPackage ../applications/editors/gnome-latex/default.nix { };
@@ -12627,6 +12631,8 @@ in
1262712631
1262812632 muparser = callPackage ../development/libraries/muparser { };
1262912633
12634+ mutest = callPackage ../development/libraries/mutest { };
12635+
1263012636 mygpoclient = pythonPackages.mygpoclient;
1263112637
1263212638 mygui = callPackage ../development/libraries/mygui {