Make polkit compile

svn path=/nixpkgs/trunk/; revision=21788
This commit is contained in:
Yury G. Kudryashov 2010-05-15 09:55:31 +00:00
parent 3fbd71aa88
commit 07c11bbec2

View file

@ -1,22 +1,34 @@
{ stdenv, fetchurl, pkgconfig, glib, eggdbus, expat, pam, intltool, gettext,
gobjectIntrospection }:
let
system="/var/run/current-system/sw";
foolVars = {
LOCALSTATE = "/var";
SYSCONF = "/etc";
LIBEXEC = "${system}/libexec";
LIB = "${system}/lib";
DATA = "${system}/share";
};
in
stdenv.mkDerivation rec {
name = "polkit-0.96";
src = fetchurl {
url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
sha256 = "0jh5v0dhf9msvmfmr9d67563m64gq5l96m9jax9abchhfa8wl9il";
};
buildInputs = [ pkgconfig glib eggdbus expat pam intltool gettext
gobjectIntrospection ];
configureFlags = "--localstatedir=/var --sysconfdir=/etc";
# TODO: PACKAGE_DATA_DIR, PACKAGE_LIBEXEC_DIR, PACKAGE_LIB_DIR
# 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) );
installFlags = "localstatedir=$(TMPDIR)/var"; # keep `make install' happy
postInstall =
''
# Allow some files with paranoid permissions to be stripped in