pkgs/development/libraries: stdenv.lib -> lib
This commit is contained in:
committed by
Jonathan Ringer
parent
046d24424e
commit
66e44425c6
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkg-config, glib, expat, pam, perl, fetchpatch
|
||||
{ lib, stdenv, fetchurl, pkg-config, glib, expat, pam, perl, fetchpatch
|
||||
, intltool, spidermonkey_78, gobject-introspection, libxslt, docbook_xsl, dbus
|
||||
, docbook_xml_dtd_412, gtk-doc, coreutils
|
||||
, useSystemd ? (stdenv.isLinux && !stdenv.hostPlatform.isMusl), systemd, elogind
|
||||
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
url = "https://gitlab.freedesktop.org/polkit/polkit/commit/5dd4e22efd05d55833c4634b56e473812b5acbf2.patch";
|
||||
sha256 = "17lv7xj5ksa27iv4zpm4zwd4iy8zbwjj4ximslfq3sasiz9kxhlp";
|
||||
})
|
||||
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
# Make netgroup support optional (musl does not have it)
|
||||
# Upstream MR: https://gitlab.freedesktop.org/polkit/polkit/merge_requests/10
|
||||
# We use the version of the patch that Alpine uses successfully.
|
||||
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
sed -i -e "s/-Wl,--as-needed//" configure.ac
|
||||
'';
|
||||
|
||||
@@ -57,8 +57,8 @@ stdenv.mkDerivation rec {
|
||||
buildInputs =
|
||||
[ expat pam spidermonkey_78 ]
|
||||
# On Linux, fall back to elogind when systemd support is off.
|
||||
++ stdenv.lib.optional stdenv.isLinux (if useSystemd then systemd else elogind)
|
||||
++ stdenv.lib.optional withIntrospection gobject-introspection;
|
||||
++ lib.optional stdenv.isLinux (if useSystemd then systemd else elogind)
|
||||
++ lib.optional withIntrospection gobject-introspection;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
glib # in .pc Requires
|
||||
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
|
||||
--replace /bin/true ${coreutils}/bin/true \
|
||||
--replace /bin/false ${coreutils}/bin/false
|
||||
|
||||
'' + stdenv.lib.optionalString useSystemd /* bogus chroot detection */ ''
|
||||
'' + lib.optionalString useSystemd /* bogus chroot detection */ ''
|
||||
sed '/libsystemd autoconfigured/s/.*/:/' -i configure
|
||||
'';
|
||||
|
||||
@@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
|
||||
"--with-polkitd-user=polkituser" #TODO? <nixos> config.ids.uids.polkituser
|
||||
"--with-os-type=NixOS" # not recognized but prevents impurities on non-NixOS
|
||||
(if withIntrospection then "--enable-introspection" else "--disable-introspection")
|
||||
] ++ stdenv.lib.optional (!doCheck) "--disable-test";
|
||||
] ++ lib.optional (!doCheck) "--disable-test";
|
||||
|
||||
makeFlags = [
|
||||
"INTROSPECTION_GIRDIR=${placeholder "out"}/share/gir-1.0"
|
||||
@@ -111,7 +111,7 @@ stdenv.mkDerivation rec {
|
||||
dbus-run-session --config-file=${./system_bus.conf} -- sh -c 'DBUS_SYSTEM_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS make check'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://www.freedesktop.org/wiki/Software/polkit";
|
||||
description = "A toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes";
|
||||
license = licenses.gpl2;
|
||||
|
||||
Reference in New Issue
Block a user