2010-05-15 09:55:15 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, glib, eggdbus, expat, pam, intltool, gettext,
|
|
|
|
gobjectIntrospection }:
|
2009-08-13 07:55:11 +00:00
|
|
|
|
2010-05-15 09:55:31 +00:00
|
|
|
let
|
|
|
|
system="/var/run/current-system/sw";
|
|
|
|
foolVars = {
|
|
|
|
LOCALSTATE = "/var";
|
|
|
|
SYSCONF = "/etc";
|
2010-05-18 16:40:17 +00:00
|
|
|
LIBEXEC = "${system}/libexec/polkit-1";
|
2010-05-15 09:55:31 +00:00
|
|
|
LIB = "${system}/lib";
|
|
|
|
DATA = "${system}/share";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2009-08-13 07:55:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2011-02-12 09:25:10 +00:00
|
|
|
name = "polkit-0.99";
|
2010-05-15 09:55:31 +00:00
|
|
|
|
2009-08-13 07:55:11 +00:00
|
|
|
src = fetchurl {
|
2010-05-15 09:54:56 +00:00
|
|
|
url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
|
2011-02-12 09:25:10 +00:00
|
|
|
sha256 = "0gsqnc5x6angma7paw0hnl5cagqimsj5f022a5vzc8n8dv1cf4pn";
|
2009-08-13 07:55:11 +00:00
|
|
|
};
|
2010-05-15 09:55:31 +00:00
|
|
|
|
2010-05-15 09:55:15 +00:00
|
|
|
buildInputs = [ pkgconfig glib eggdbus expat pam intltool gettext
|
|
|
|
gobjectIntrospection ];
|
2009-08-13 07:55:11 +00:00
|
|
|
|
2010-05-18 16:40:17 +00:00
|
|
|
preConfigure=''
|
|
|
|
configureFlags="--libexecdir=$out/libexec/polkit-1"
|
|
|
|
'';
|
|
|
|
|
2010-05-15 09:55:31 +00: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 21:47:51 +00:00
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Allow some files with paranoid permissions to be stripped in
|
|
|
|
# the fixup phase.
|
|
|
|
chmod a+rX -R $out
|
|
|
|
'';
|
2009-08-16 12:03:45 +00:00
|
|
|
|
2010-05-15 09:54:56 +00:00
|
|
|
meta = with stdenv.lib; {
|
2009-08-13 07:55:11 +00: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 09:54:56 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.urkud ];
|
2009-08-13 07:55:11 +00:00
|
|
|
};
|
|
|
|
}
|