about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libappindicator
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/libappindicator
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libappindicator')
-rw-r--r--nixpkgs/pkgs/development/libraries/libappindicator/default.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libappindicator/default.nix b/nixpkgs/pkgs/development/libraries/libappindicator/default.nix
new file mode 100644
index 000000000000..46cc30a8944f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libappindicator/default.nix
@@ -0,0 +1,78 @@
+# TODO: Resolve the issues with the Mono bindings.
+
+{ stdenv, fetchurl, lib, file
+, pkgconfig, autoconf
+, glib, dbus-glib, gtkVersion ? "3"
+, gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null
+, gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null
+, python2Packages, gobject-introspection, vala
+, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
+ }:
+
+with lib;
+
+let
+  inherit (python2Packages) python pygobject2 pygtk;
+in 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 ];
+
+  propagatedBuildInputs =
+    if gtkVersion == "2"
+    then [ gtk2 libdbusmenu-gtk2 ]
+    else [ gtk3 libdbusmenu-gtk3 ];
+
+  buildInputs = [
+    glib dbus-glib
+    python pygobject2 pygtk gobject-introspection vala
+  ] ++ (if gtkVersion == "2"
+    then [ libindicator-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
+    else [ libindicator-gtk3 ]);
+
+  postPatch = ''
+    substituteInPlace configure.ac \
+      --replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0'
+    autoconf
+    for f in {configure,ltmain.sh,m4/libtool.m4}; do
+      substituteInPlace $f \
+        --replace /usr/bin/file ${file}/bin/file
+    done
+  '';
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--with-gtk=${gtkVersion}"
+  ];
+
+  postConfigure = ''
+    substituteInPlace configure \
+      --replace /usr/bin/file ${file}/bin/file
+  '';
+
+  doCheck = false; # generates shebangs in check phase, too lazy to fix
+
+  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 ];
+  };
+}