mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 20:36:27 +00:00
1502152a7d
The indicator libraries for GTK2 and GTK3. The bindings for Mono do not work yet because of some issues with Perl in gtk-sharp-2 and an Unhandled Exception caused by building with multiple cores: https://aur.archlinux.org/packages/libindicate-sharp/#comment-290385 Some packages have TODOs for the indicator libraries, since it is an optional dependency for most packages. These packages have not been updated by this commit.
60 lines
1.8 KiB
Nix
60 lines
1.8 KiB
Nix
{ stdenv, fetchurl, lib, file
|
|
, pkgconfig, intltool
|
|
, glib, dbus_glib, json_glib
|
|
, gobjectIntrospection, vala, gnome_doc_utils
|
|
, gtkVersion ? null, gtk2 ? null, gtk3 ? null }:
|
|
|
|
with lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = let postfix = if gtkVersion == null then "glib" else "gtk${gtkVersion}";
|
|
in "libdbusmenu-${postfix}-${version}";
|
|
version = "${versionMajor}.${versionMinor}";
|
|
versionMajor = "12.10";
|
|
versionMinor = "2";
|
|
|
|
src = fetchurl {
|
|
url = "${meta.homepage}/${versionMajor}/${version}/+download/libdbusmenu-${version}.tar.gz";
|
|
sha256 = "9d6ad4a0b918b342ad2ee9230cce8a095eb601cb0cee6ddc1122d0481f9d04c9";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig intltool ];
|
|
|
|
buildInputs = [
|
|
glib dbus_glib json_glib
|
|
gobjectIntrospection vala gnome_doc_utils
|
|
] ++ optional (gtkVersion != null) (if gtkVersion == "2" then gtk2 else gtk3);
|
|
|
|
postPatch = ''
|
|
substituteInPlace {configure,ltmain.sh,m4/libtool.m4} \
|
|
--replace /usr/bin/file ${file}/bin/file
|
|
'';
|
|
|
|
# https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/libdbusmenu
|
|
preConfigure = ''
|
|
export HAVE_VALGRIND_TRUE="#"
|
|
export HAVE_VALGRIND_FALSE=""
|
|
'';
|
|
|
|
configureFlags = [
|
|
"CFLAGS=-Wno-error"
|
|
"--sysconfdir=/etc"
|
|
"--localstatedir=/var"
|
|
(if gtkVersion == null then "--disable-gtk" else "--with-gtk=${gtkVersion}")
|
|
"--disable-scrollkeeper"
|
|
] ++ optional (gtkVersion != "2") "--disable-dumper";
|
|
|
|
installFlags = [
|
|
"sysconfdir=\${out}/etc"
|
|
"localstatedir=\${TMPDIR}"
|
|
];
|
|
|
|
meta = {
|
|
description = "A library for passing menu structures across DBus";
|
|
homepage = "https://launchpad.net/dbusmenu";
|
|
license = with licenses; [ gpl3 lgpl21 lgpl3 ];
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.msteen ];
|
|
};
|
|
}
|