1{ stdenv
2, lib
3, autoreconfHook
4, gitUpdater
5, gnome-common
6, which
7, fetchgit
8, libgtop
9, libwnck
10, glib
11, vala
12, pkg-config
13, libstartup_notification
14, gobject-introspection
15, gtk-doc
16, docbook_xsl
17, xorgserver
18, dbus
19, python3
20, wrapGAppsHook3
21}:
22
23stdenv.mkDerivation rec {
24 pname = "bamf";
25 version = "0.5.6";
26
27 outputs = [ "out" "dev" "devdoc" ];
28
29 src = fetchgit {
30 url = "https://git.launchpad.net/~unity-team/bamf";
31 rev = version;
32 sha256 = "7U+2GcuDjPU8quZjkd8bLADGlG++tl6wSo0mUQkjAXQ=";
33 };
34
35 nativeBuildInputs = [
36 (python3.withPackages (ps: with ps; [ lxml ])) # Tests
37 autoreconfHook
38 dbus
39 docbook_xsl
40 gnome-common
41 gobject-introspection
42 gtk-doc
43 pkg-config
44 vala
45 which
46 wrapGAppsHook3
47 xorgserver
48 ];
49
50 buildInputs = [
51 glib
52 libgtop
53 libstartup_notification
54 libwnck
55 ];
56
57 # Fix hard-coded path
58 # https://bugs.launchpad.net/bamf/+bug/1780557
59 postPatch = ''
60 substituteInPlace data/Makefile.am \
61 --replace '/usr/lib/systemd/user' '@prefix@/lib/systemd/user'
62 '';
63
64 configureFlags = [
65 "--enable-gtk-doc"
66 "--enable-headless-tests"
67 ];
68
69 # Fix paths
70 makeFlags = [
71 "INTROSPECTION_GIRDIR=${placeholder "dev"}/share/gir-1.0/"
72 "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0"
73 ];
74
75 # TODO: Requires /etc/machine-id
76 doCheck = false;
77
78 # Ignore deprecation errors
79 env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
80
81 passthru.updateScript = gitUpdater {
82 ignoredVersions = ".ubuntu.*";
83 };
84
85 meta = with lib; {
86 description = "Application matching framework";
87 longDescription = ''
88 Removes the headache of applications matching
89 into a simple DBus daemon and c wrapper library.
90 '';
91 homepage = "https://launchpad.net/bamf";
92 license = licenses.lgpl3;
93 platforms = platforms.linux;
94 maintainers = with maintainers; [ davidak ] ++ teams.pantheon.members;
95 };
96}