1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 meson,
6 ninja,
7 pkg-config,
8 gtk-doc,
9 docbook-xsl-nons,
10 docbook_xml_dtd_43,
11 glib,
12 nixosTests,
13}:
14
15stdenv.mkDerivation rec {
16 pname = "glib-testing";
17 version = "0.1.1";
18
19 outputs = [
20 "out"
21 "dev"
22 "devdoc"
23 "installedTests"
24 ];
25
26 src = fetchFromGitLab {
27 domain = "gitlab.gnome.org";
28 owner = "pwithnall";
29 repo = "libglib-testing";
30 rev = version;
31 sha256 = "U3epLDdLES7MA71z7Q1WXMjzySTFERWBU0u8poObbEo=";
32 };
33
34 patches = [
35 # allow installing installed tests to a separate output
36 ./installed-tests-path.patch
37 ];
38
39 nativeBuildInputs = [
40 meson
41 ninja
42 pkg-config
43 gtk-doc
44 docbook-xsl-nons
45 docbook_xml_dtd_43
46 ];
47
48 propagatedBuildInputs = [
49 glib
50 ];
51
52 mesonFlags = [
53 "-Dinstalled_tests=true"
54 "-Dinstalled_test_prefix=${placeholder "installedTests"}"
55 ];
56
57 passthru = {
58 tests = {
59 installedTests = nixosTests.installed-tests.glib-testing;
60 };
61 };
62
63 meta = with lib; {
64 description = "Test library providing test harnesses and mock classes complementing the classes provided by GLib";
65 homepage = "https://gitlab.gnome.org/pwithnall/libglib-testing";
66 license = licenses.lgpl21Plus;
67 maintainers = with maintainers; [ jtojnar ];
68 platforms = platforms.unix;
69 };
70}