summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorLuca Bruno <lethalman88@gmail.com>2014-05-19 13:13:32 +0200
committerLuca Bruno <lucabru@src.gnome.org>2014-05-20 13:41:39 +0200
commitdf95a8cc2f922e41aab51d94e3faacc83ed0e80a (patch)
tree9362d7fbd3d1a9a70c5369fa7b355f02e5461f7a /pkgs/os-specific
parent819b5841c6586662416df895502040d64377331f (diff)
downloadnixlib-df95a8cc2f922e41aab51d94e3faacc83ed0e80a.tar
nixlib-df95a8cc2f922e41aab51d94e3faacc83ed0e80a.tar.gz
nixlib-df95a8cc2f922e41aab51d94e3faacc83ed0e80a.tar.bz2
nixlib-df95a8cc2f922e41aab51d94e3faacc83ed0e80a.tar.lz
nixlib-df95a8cc2f922e41aab51d94e3faacc83ed0e80a.tar.xz
nixlib-df95a8cc2f922e41aab51d94e3faacc83ed0e80a.tar.zst
nixlib-df95a8cc2f922e41aab51d94e3faacc83ed0e80a.zip
upower: add 0.99 version for gnome 3.12
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/upower/0.99.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/upower/0.99.nix b/pkgs/os-specific/linux/upower/0.99.nix
new file mode 100644
index 000000000000..c42fea16d353
--- /dev/null
+++ b/pkgs/os-specific/linux/upower/0.99.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl, pkgconfig, glib, dbus, dbus_glib, dbus_tools, polkit
+, intltool, libxslt, docbook_xsl, udev, libusb1, pmutils
+, useSystemd ? true, systemd, gobjectIntrospection
+}:
+
+assert stdenv.isLinux;
+
+stdenv.mkDerivation rec {
+  name = "upower-0.99.0";
+
+  src = fetchurl {
+    url = "http://upower.freedesktop.org/releases/${name}.tar.xz";
+    sha256 = "189rd8j5czy4fs7imxvr38icjh9vlgdz6ki2h08v530h96clndaz";
+  };
+
+  buildInputs =
+    [ dbus_glib polkit intltool libxslt docbook_xsl udev libusb1 gobjectIntrospection ]
+    ++ stdenv.lib.optional useSystemd systemd;
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  preConfigure =
+    ''
+      substituteInPlace src/linux/up-backend.c \
+        --replace /usr/bin/pm- ${pmutils}/bin/pm- \
+        --replace /usr/sbin/pm- ${pmutils}/sbin/pm-
+      substituteInPlace src/notify-upower.sh \
+        --replace /usr/bin/dbus-send ${dbus_tools}/bin/dbus-send
+    '';
+
+  configureFlags =
+    [ "--with-backend=linux" "--localstatedir=/var"
+      "--enable-deprecated" # needed for Xfce (Nov 2013)
+    ]
+    ++ stdenv.lib.optional useSystemd
+    [ "--enable-systemd"
+      "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
+      "--with-systemdutildir=$(out)/lib/systemd/system-sleep"
+      "--with-udevrulesdir=$(out)/lib/udev/rules.d"
+    ];
+
+  NIX_CFLAGS_LINK = "-lgcc_s";
+
+  installFlags = "historydir=$(TMPDIR)/foo";
+
+  meta = {
+    homepage = http://upower.freedesktop.org/;
+    description = "A D-Bus service for power management";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}