about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/glib-testing/default.nix
blob: d77a5418a13e1d5da39a2f1784e03d761979bd8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{ lib, stdenv
, fetchFromGitLab
, meson
, ninja
, pkg-config
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_43
, glib
, nixosTests
}:

stdenv.mkDerivation rec {
  pname = "glib-testing";
  version = "0.1.1";

  outputs = [ "out" "dev" "devdoc" "installedTests" ];

  src = fetchFromGitLab {
    domain = "gitlab.gnome.org";
    owner = "pwithnall";
    repo = "libglib-testing";
    rev = version;
    sha256 = "U3epLDdLES7MA71z7Q1WXMjzySTFERWBU0u8poObbEo=";
  };

  patches = [
    # allow installing installed tests to a separate output
    ./installed-tests-path.patch
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    gtk-doc
    docbook-xsl-nons
    docbook_xml_dtd_43
  ];

  propagatedBuildInputs = [
    glib
  ];

  mesonFlags = [
    "-Dinstalled_tests=true"
    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
  ];

  passthru = {
    tests = {
      installedTests = nixosTests.installed-tests.glib-testing;
    };
  };

  meta = with lib; {
    description = "Test library providing test harnesses and mock classes complementing the classes provided by GLib";
    homepage = "https://gitlab.gnome.org/pwithnall/libglib-testing";
    license = licenses.lgpl21Plus;
    maintainers = with maintainers; [ jtojnar ];
    platforms = platforms.unix;
  };
}