2015-11-02 14:23:35 +00:00
|
|
|
# TODO: Resolve the issues with the Mono bindings.
|
|
|
|
|
|
|
|
{ stdenv, fetchurl, lib, file
|
|
|
|
, pkgconfig, autoconf
|
2018-07-17 21:11:16 +01:00
|
|
|
, glib, dbus-glib, libdbusmenu
|
2018-05-01 19:46:05 +01:00
|
|
|
, gtkVersion ? "3", gtk2 ? null, gtk3 ? null
|
2018-02-25 02:23:58 +00:00
|
|
|
, pythonPackages, gobjectIntrospection, vala, gnome-doc-utils
|
2016-09-11 22:24:51 +01:00
|
|
|
, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
|
2015-11-02 14:23:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2016-09-26 08:45:55 +01:00
|
|
|
let
|
|
|
|
inherit (pythonPackages) python pygobject2 pygtk;
|
|
|
|
in stdenv.mkDerivation rec {
|
2015-11-02 14:23:35 +00:00
|
|
|
name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}";
|
|
|
|
in "libindicate-${postfix}-${version}";
|
|
|
|
version = "${versionMajor}.${versionMinor}";
|
|
|
|
versionMajor = "12.10";
|
|
|
|
versionMinor = "1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}/${versionMajor}/${version}/+download/libindicate-${version}.tar.gz";
|
|
|
|
sha256 = "10am0ymajx633b33anf6b79j37k61z30v9vaf5f9fwk1x5cw1q21";
|
|
|
|
};
|
|
|
|
|
2018-02-25 02:23:58 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig autoconf gobjectIntrospection vala gnome-doc-utils ];
|
2015-11-02 14:23:35 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2018-07-17 21:11:16 +01:00
|
|
|
glib dbus-glib libdbusmenu
|
2017-12-19 05:02:10 +00:00
|
|
|
python pygobject2 pygtk
|
2015-11-02 14:23:35 +00:00
|
|
|
] ++ (if gtkVersion == "2"
|
2016-09-11 22:24:51 +01:00
|
|
|
then [ gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
|
2015-11-02 14:23:35 +00:00
|
|
|
else [ gtk3 ]);
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0' \
|
|
|
|
--replace 'pyglib-2.0-python$PYTHON_VERSION' 'pyglib-2.0-python'
|
|
|
|
autoconf
|
2017-08-02 17:29:00 +01:00
|
|
|
for f in {configure,ltmain.sh,m4/libtool.m4}; do
|
|
|
|
substituteInPlace $f \
|
|
|
|
--replace /usr/bin/file ${file}/bin/file
|
|
|
|
done
|
2015-11-02 14:23:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"CFLAGS=-Wno-error"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-gtk=${gtkVersion}"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Library for raising indicators via DBus";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://launchpad.net/libindicate;
|
2015-11-02 14:23:35 +00:00
|
|
|
license = with licenses; [ lgpl21 lgpl3 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.msteen ];
|
|
|
|
};
|
|
|
|
}
|