1{ dbus
2, fetchFromGitLab
3, gobject-introspection
4, lib
5, libadwaita
6, meson
7, ninja
8, python3
9, stdenv
10, testers
11, xvfb-run
12}:
13stdenv.mkDerivation (finalAttrs: {
14 pname = "blueprint-compiler";
15 version = "0.12.0";
16
17 src = fetchFromGitLab {
18 domain = "gitlab.gnome.org";
19 owner = "jwestman";
20 repo = "blueprint-compiler";
21 rev = "v${finalAttrs.version}";
22 hash = "sha256-pvYSFCiYynH3E6QOTu4RfG+6eucq++yiRu75qucSlZU=";
23 };
24
25 nativeBuildInputs = [
26 meson
27 ninja
28 ];
29
30 buildInputs = [
31 libadwaita
32 (python3.withPackages (ps: with ps; [
33 pygobject3
34 ]))
35 ];
36
37 propagatedBuildInputs = [
38 # For setup hook, so that the compiler can find typelib files
39 gobject-introspection
40 ];
41
42 nativeCheckInputs = [
43 dbus
44 xvfb-run
45 ];
46
47 # requires xvfb-run
48 doCheck = !stdenv.isDarwin
49 && false; # tests time out
50
51 checkPhase = ''
52 runHook preCheck
53
54 xvfb-run dbus-run-session \
55 --config-file=${dbus}/share/dbus-1/session.conf \
56 meson test --no-rebuild --print-errorlogs
57
58 runHook postCheck
59 '';
60
61 passthru.tests.version = testers.testVersion {
62 package = finalAttrs.finalPackage;
63 };
64
65 meta = with lib; {
66 description = "Markup language for GTK user interface files";
67 mainProgram = "blueprint-compiler";
68 homepage = "https://gitlab.gnome.org/jwestman/blueprint-compiler";
69 license = licenses.lgpl3Plus;
70 maintainers = with maintainers; [ benediktbroich ranfdev ];
71 platforms = platforms.unix;
72 };
73})