nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 17.09 76 lines 2.2 kB view raw
1# TODO: Resolve the issues with the Mono bindings. 2 3{ stdenv, fetchurl, lib, file 4, pkgconfig, autoconf 5, glib, dbus_glib, gtkVersion 6, gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null 7, gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null 8, python2Packages, gobjectIntrospection, vala_0_23 9, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null 10 }: 11 12with lib; 13 14let 15 inherit (python2Packages) python pygobject2 pygtk; 16in stdenv.mkDerivation rec { 17 name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}"; 18 in "libappindicator-${postfix}-${version}"; 19 version = "${versionMajor}.${versionMinor}"; 20 versionMajor = "12.10"; 21 versionMinor = "0"; 22 23 src = fetchurl { 24 url = "${meta.homepage}/${versionMajor}/${version}/+download/libappindicator-${version}.tar.gz"; 25 sha256 = "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"; 26 }; 27 28 nativeBuildInputs = [ pkgconfig autoconf ]; 29 30 propagatedBuildInputs = 31 if gtkVersion == "2" 32 then [ gtk2 libdbusmenu-gtk2 ] 33 else [ gtk3 libdbusmenu-gtk3 ]; 34 35 buildInputs = [ 36 glib dbus_glib 37 python pygobject2 pygtk gobjectIntrospection vala_0_23 38 ] ++ (if gtkVersion == "2" 39 then [ libindicator-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ] 40 else [ libindicator-gtk3 ]); 41 42 postPatch = '' 43 substituteInPlace configure.ac \ 44 --replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0' 45 autoconf 46 for f in {configure,ltmain.sh,m4/libtool.m4}; do 47 substituteInPlace $f \ 48 --replace /usr/bin/file ${file}/bin/file 49 done 50 ''; 51 52 configureFlags = [ 53 "CFLAGS=-Wno-error" 54 "--sysconfdir=/etc" 55 "--localstatedir=/var" 56 "--with-gtk=${gtkVersion}" 57 ]; 58 59 postConfigure = '' 60 substituteInPlace configure \ 61 --replace /usr/bin/file ${file}/bin/file 62 ''; 63 64 installFlags = [ 65 "sysconfdir=\${out}/etc" 66 "localstatedir=\${TMPDIR}" 67 ]; 68 69 meta = { 70 description = "A library to allow applications to export a menu into the Unity Menu bar"; 71 homepage = https://launchpad.net/libappindicator; 72 license = with licenses; [ lgpl21 lgpl3 ]; 73 platforms = platforms.linux; 74 maintainers = [ maintainers.msteen ]; 75 }; 76}