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,6 +1,17 @@
{ 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";
@ -12,10 +23,11 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig glib eggdbus expat pam intltool gettext
gobjectIntrospection ];
configureFlags = "--localstatedir=/var --sysconfdir=/etc";
# TODO: PACKAGE_DATA_DIR, PACKAGE_LIBEXEC_DIR, PACKAGE_LIB_DIR
installFlags = "localstatedir=$(TMPDIR)/var"; # keep `make install' happy
# 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) );
postInstall =
''