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