polkit: remove hacks, fix chroot builds
This commit is contained in:
parent
5bcdc3efd2
commit
f445474d33
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, spidermonkey
|
{ stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, spidermonkey
|
||||||
, gobjectIntrospection
|
, gobjectIntrospection
|
||||||
, useSystemd ? true, systemd }:
|
, useSystemd ? stdenv.isLinux, systemd }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -27,18 +27,18 @@ stdenv.mkDerivation rec {
|
|||||||
[ pkgconfig glib expat pam intltool spidermonkey gobjectIntrospection ]
|
[ pkgconfig glib expat pam intltool spidermonkey gobjectIntrospection ]
|
||||||
++ stdenv.lib.optional useSystemd systemd;
|
++ stdenv.lib.optional useSystemd systemd;
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
patchShebangs .
|
||||||
|
'' + stdenv.lib.optionalString useSystemd /* bogus chroot detection */ ''
|
||||||
|
sed '/libsystemd-login autoconfigured, but system does not appear to use systemd/s/.*/:/' -i configure
|
||||||
|
'';
|
||||||
|
|
||||||
# TODO: Distro/OS detection is impure
|
# TODO: Distro/OS detection is impure
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--libexecdir=$(out)/libexec/polkit-1"
|
"--libexecdir=$(out)/libexec/polkit-1"
|
||||||
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
||||||
];
|
];
|
||||||
|
|
||||||
# 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) );
|
|
||||||
|
|
||||||
preBuild =
|
preBuild =
|
||||||
''
|
''
|
||||||
# ‘libpolkit-agent-1.so’ should call the setuid wrapper on
|
# ‘libpolkit-agent-1.so’ should call the setuid wrapper on
|
||||||
|
Loading…
x
Reference in New Issue
Block a user