2010-05-15 11:55:15 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, glib, eggdbus, expat, pam, intltool, gettext,
|
|
|
|
gobjectIntrospection }:
|
2009-08-13 09:55:11 +02:00
|
|
|
|
2010-05-15 11:55:31 +02:00
|
|
|
let
|
|
|
|
system="/var/run/current-system/sw";
|
|
|
|
foolVars = {
|
|
|
|
LOCALSTATE = "/var";
|
|
|
|
SYSCONF = "/etc";
|
|
|
|
LIBEXEC = "${system}/libexec";
|
|
|
|
LIB = "${system}/lib";
|
|
|
|
DATA = "${system}/share";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2009-08-13 09:55:11 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-05-15 11:55:15 +02:00
|
|
|
name = "polkit-0.96";
|
2010-05-15 11:55:31 +02:00
|
|
|
|
2009-08-13 09:55:11 +02:00
|
|
|
src = fetchurl {
|
2010-05-15 11:54:56 +02:00
|
|
|
url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
|
2010-05-15 11:55:15 +02:00
|
|
|
sha256 = "0jh5v0dhf9msvmfmr9d67563m64gq5l96m9jax9abchhfa8wl9il";
|
2009-08-13 09:55:11 +02:00
|
|
|
};
|
2010-05-15 11:55:31 +02:00
|
|
|
|
2010-05-15 11:55:15 +02:00
|
|
|
buildInputs = [ pkgconfig glib eggdbus expat pam intltool gettext
|
|
|
|
gobjectIntrospection ];
|
2009-08-13 09:55:11 +02:00
|
|
|
|
2010-05-15 11:55:31 +02:00
|
|
|
# Ugly hack to overwrite hardcoded directories
|
|
|
|
# TODO: investigate a proper patch which will be accepted upstream
|
|
|
|
CFLAGS = stdenv.lib.concatStringsSep " "
|
|
|
|
( map (var: ''-DPACKAGE_${var}_DIR=\""${builtins.getAttr var foolVars}"\"'')
|
|
|
|
(builtins.attrNames foolVars) );
|
2009-08-16 23:47:51 +02:00
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Allow some files with paranoid permissions to be stripped in
|
|
|
|
# the fixup phase.
|
|
|
|
chmod a+rX -R $out
|
|
|
|
'';
|
2009-08-16 14:03:45 +02:00
|
|
|
|
2010-05-15 11:54:56 +02:00
|
|
|
meta = with stdenv.lib; {
|
2009-08-13 09:55:11 +02:00
|
|
|
homepage = http://www.freedesktop.org/wiki/Software/PolicyKit;
|
|
|
|
description = "A toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes";
|
2010-05-15 11:54:56 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.urkud ];
|
2009-08-13 09:55:11 +02:00
|
|
|
};
|
|
|
|
}
|