1 { stdenv, fetchurl, lib, file
3 , glib, dbus-glib, json-glib
4 , gobject-introspection, vala
5 , gtkVersion ? null, gtk2 ? null, gtk3 ? null }:
9 stdenv.mkDerivation rec {
10 name = let postfix = if gtkVersion == null then "glib" else "gtk${gtkVersion}";
11 in "libdbusmenu-${postfix}-${version}";
12 version = "${versionMajor}.${versionMinor}";
13 versionMajor = "16.04";
17 url = "${meta.homepage}/${versionMajor}/${version}/+download/libdbusmenu-${version}.tar.gz";
18 sha256 = "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r";
21 nativeBuildInputs = [ vala pkg-config intltool gobject-introspection ];
24 glib dbus-glib json-glib
25 ] ++ optional (gtkVersion != null) (if gtkVersion == "2" then gtk2 else gtk3);
28 for f in {configure,ltmain.sh,m4/libtool.m4}; do
29 substituteInPlace $f \
30 --replace /usr/bin/file ${file}/bin/file
34 # https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/libdbusmenu
36 export HAVE_VALGRIND_TRUE="#"
37 export HAVE_VALGRIND_FALSE=""
43 "--localstatedir=/var"
44 (if gtkVersion == null then "--disable-gtk" else "--with-gtk=${gtkVersion}")
45 "--disable-scrollkeeper"
46 ] ++ optional (gtkVersion != "2") "--disable-dumper";
48 doCheck = false; # generates shebangs in check phase, too lazy to fix
51 "sysconfdir=${placeholder "out"}/etc"
52 "localstatedir=\${TMPDIR}"
53 "typelibdir=${placeholder "out"}/lib/girepository-1.0"
57 description = "Library for passing menu structures across DBus";
58 homepage = "https://launchpad.net/dbusmenu";
59 license = with licenses; [ gpl3 lgpl21 lgpl3 ];
60 platforms = platforms.linux;
61 maintainers = [ maintainers.msteen ];