Merge pull request #149530 from alyssais/util-linux-static

[staging-next] Revert "util-linux: fix static build"
This commit is contained in:
Dmitry Kalinkin 2021-12-19 12:26:26 -05:00 committed by GitHub
commit 984f2b02ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,8 @@
{ lib, stdenv, fetchurl, pkg-config, zlib, shadow, libcap_ng
, ncurses ? null, pam, systemd ? null
, nlsSupport ? true
, audit ? null
}:
assert stdenv.hostPlatform.isStatic -> audit != null;
stdenv.mkDerivation rec {
pname = "util-linux";
version = "2.37.2";
@ -61,17 +58,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs =
[ zlib pam libcap_ng ]
++ lib.filter (p: p != null) [ ncurses systemd ]
# not sure how util-linux is linking with linux-pam,
# probably just with a simplistic -lpam.
# linux-pam doesn't seem to have a .pc file so I can't
# add -laudit to the Requires.private.
# libaudit is also needed directly anyway cf login-utils/login.c
# and sys-utils/hwclock.c, not sure how we got it working
# without audit on dynamic builds.
++ lib.optionals stdenv.hostPlatform.isStatic [ audit ];
NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isStatic "-laudit";
++ lib.filter (p: p != null) [ ncurses systemd ];
doCheck = false; # "For development purpose only. Don't execute on production system!"