summary refs log tree commit diff
path: root/pkgs/development/libraries/libappindicator/default.nix
diff options
context:
space:
mode:
authorMatthijs Steen <emailmatthijs@gmail.com>2015-11-02 15:23:35 +0100
committerMatthijs Steen <emailmatthijs@gmail.com>2015-11-02 15:23:35 +0100
commit1502152a7d65b4a23e96e533cf8b9910f1691cdb (patch)
tree4517be129175132dfe0f7d0c9c3d73ae7712ca44 /pkgs/development/libraries/libappindicator/default.nix
parentb44df493d325cc10df9ea9f6b6987c432b300fb7 (diff)
downloadnixpkgs-1502152a7d65b4a23e96e533cf8b9910f1691cdb.tar
nixpkgs-1502152a7d65b4a23e96e533cf8b9910f1691cdb.tar.gz
nixpkgs-1502152a7d65b4a23e96e533cf8b9910f1691cdb.tar.bz2
nixpkgs-1502152a7d65b4a23e96e533cf8b9910f1691cdb.tar.lz
nixpkgs-1502152a7d65b4a23e96e533cf8b9910f1691cdb.tar.xz
nixpkgs-1502152a7d65b4a23e96e533cf8b9910f1691cdb.tar.zst
nixpkgs-1502152a7d65b4a23e96e533cf8b9910f1691cdb.zip
indicator libraries: init at 12.10
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.
Diffstat (limited to 'pkgs/development/libraries/libappindicator/default.nix')
-rw-r--r--pkgs/development/libraries/libappindicator/default.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libappindicator/default.nix b/pkgs/development/libraries/libappindicator/default.nix
new file mode 100644
index 00000000000..0dac5e4766f
--- /dev/null
+++ b/pkgs/development/libraries/libappindicator/default.nix
@@ -0,0 +1,67 @@
+# TODO: Resolve the issues with the Mono bindings.
+
+{ stdenv, fetchurl, lib, file
+, pkgconfig, autoconf
+, glib, dbus_glib, gtkVersion
+, gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null
+, gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null
+, python, pygobject, pygtk, gobjectIntrospection, vala
+, monoSupport ? false, mono ? null, gtk-sharp ? null
+ }:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}";
+          in "libappindicator-${postfix}-${version}";
+  version = "${versionMajor}.${versionMinor}";
+  versionMajor = "12.10";
+  versionMinor = "0";
+
+  src = fetchurl {
+    url = "${meta.homepage}/${versionMajor}/${version}/+download/libappindicator-${version}.tar.gz";
+    sha256 = "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m";
+  };
+
+  nativeBuildInputs = [ pkgconfig autoconf ];
+
+  buildInputs = [
+    glib dbus_glib
+    python pygobject pygtk gobjectIntrospection vala
+  ] ++ (if gtkVersion == "2"
+    then [ gtk2 libindicator-gtk2 libdbusmenu-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp ]
+    else [ gtk3 libindicator-gtk3 libdbusmenu-gtk3 ]);
+
+  postPatch = ''
+    substituteInPlace configure.ac \
+      --replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0'
+    autoconf
+    substituteInPlace {configure,ltmain.sh,m4/libtool.m4} \
+      --replace /usr/bin/file ${file}/bin/file
+  '';
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--with-gtk=${gtkVersion}"
+  ];
+
+  postConfigure = ''
+    substituteInPlace configure \
+      --replace /usr/bin/file ${file}/bin/file
+  '';
+
+  installFlags = [
+    "sysconfdir=\${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 ];
+  };
+}