nixpkgs/pkgs/development/libraries/libappindicator/default.nix
Euan Kemp 98e0716512 libappindicator: 12.10.0 -> 12.10.1+20.10.20200706.1
This moves libappindicator to use a different upstream source. Rather
than use the 8 year old (!) version displayed on its homepage
(https://launchpad.net/libappindicator), this switches us to the
maintained lp:libappindicator branch, browseable over here:
https://code.launchpad.net/~indicator-applet-developers/libappindicator/trunk.

This includes numerous fixes, remains updated, and matches what ubuntu
uses.

Due to a personal preference for git over bzr, I have the package using
ubuntu's git mirror of the package for the source rather than the bzr
repo where I _think_ development actually takes place.

This also removes the no-python patch, because per revision 292
(https://bazaar.launchpad.net/~indicator-applet-developers/libappindicator/trunk/revision/292),
that has been dropped from upstream already, so the patch is no longer
needed.

The primary motivation behind this change is to fix a crash with
libappindicator (reported
https://bugs.launchpad.net/ubuntu/+source/libappindicator/+bug/1867996
and in various other places).

The relevant patch for that should be included in this version.
2020-08-25 14:50:48 -07:00

67 lines
1.8 KiB
Nix

# TODO: Resolve the issues with the Mono bindings.
{ stdenv, fetchgit, lib
, pkgconfig, autoreconfHook
, glib, dbus-glib, gtkVersion ? "3"
, gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null
, gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null
, gtk-doc, vala, gobject-introspection
, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
}:
with lib;
stdenv.mkDerivation rec {
name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}";
in "libappindicator-${postfix}-${version}";
version = "12.10.1+20.10.20200706.1";
outputs = [ "out" "dev" ];
src = fetchgit {
url = "https://git.launchpad.net/ubuntu/+source/libappindicator";
rev = "fe25e53bc7e39cd59ad6b3270cd7a6a9c78c4f44";
sha256 = "0xjvbl4gn7ra2fs6gn2g9s787kzb5cg9hv79iqsz949rxh4iw32d";
};
nativeBuildInputs = [ pkgconfig autoreconfHook vala gobject-introspection gtk-doc ];
propagatedBuildInputs =
if gtkVersion == "2"
then [ gtk2 libdbusmenu-gtk2 ]
else [ gtk3 libdbusmenu-gtk3 ];
buildInputs = [
glib dbus-glib
] ++ (if gtkVersion == "2"
then [ libindicator-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
else [ libindicator-gtk3 ]);
preAutoreconf = ''
gtkdocize
'';
configureFlags = [
"CFLAGS=-Wno-error"
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-gtk=${gtkVersion}"
];
doCheck = false; # generates shebangs in check phase, too lazy to fix
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
"localstatedir=\${TMPDIR}"
];
meta = {
description = "A library to allow applications to export a menu into the Unity Menu bar";
homepage = "https://launchpad.net/libappindicator";
license = with licenses; [ lgpl21 lgpl3 ];
platforms = platforms.linux;
maintainers = [ maintainers.msteen ];
};
}