summary refs log tree commit diff
path: root/pkgs/development/libraries/bamf/default.nix
blob: 0a2badea7cbfb6e0d3d65675d02f6f371d3c795f (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
64
65
66
67
68
69
{ stdenv, fetchurl, libgtop, libwnck3, glib, vala, pkgconfig
, libstartup_notification, gobjectIntrospection, gtk-doc
, xorgserver, dbus, python2 }:

stdenv.mkDerivation rec {
  pname = "bamf";
  version = "0.5.3";
  name = "${pname}-${version}";

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

  src = fetchurl {
    url = "https://launchpad.net/${pname}/0.5/${version}/+download/${name}.tar.gz";
    sha256 = "051vib8ndp09ph5bfwkgmzda94varzjafwxf6lqx7z1s8rd7n39l";
  };

  nativeBuildInputs = [
    pkgconfig
    gtk-doc
    gobjectIntrospection
    vala
    # Tests
    xorgserver
    dbus
    (python2.withPackages (pkgs: with pkgs; [ libxslt libxml2 ]))
  ];

  buildInputs = [
    libgtop
    libwnck3
    libstartup_notification
    glib
  ];

  # Fix hard-coded path
  # https://bugs.launchpad.net/bamf/+bug/1780557
  postPatch = ''
    substituteInPlace data/Makefile.in \
      --replace '/usr/lib/systemd/user' '@prefix@/lib/systemd/user'
  '';

  configureFlags = [
    "--enable-headless-tests"
  ];

  # fix paths
  makeFlags = [
    "INTROSPECTION_GIRDIR=$(dev)/share/gir-1.0/"
    "INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
  ];

  # TODO: Requires /etc/machine-id
  doCheck = false;

  # ignore deprecation errors
  NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";

  meta = with stdenv.lib; {
    description = "Application matching framework";
    longDescription = ''
      Removes the headache of applications matching
      into a simple DBus daemon and c wrapper library.
    '';
    homepage = https://launchpad.net/bamf;
    license = licenses.lgpl3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ davidak ];
  };
}