rpm: add a disableUnshare option (#371387)

This commit is contained in:
Paul Meyer
2025-01-08 10:53:03 +01:00
committed by GitHub
@@ -29,6 +29,10 @@
bubblewrap,
autoconf,
gnupg,
# Disable the unshare RPM plugin, which can be useful if
# RPM is ran within the Nix sandbox.
disableUnshare ? true,
}:
stdenv.mkDerivation rec {
@@ -112,6 +116,9 @@ stdenv.mkDerivation rec {
++ lib.optionals stdenv.hostPlatform.isDarwin [
"-DWITH_LIBELF=OFF"
"-DWITH_LIBDW=OFF"
]
++ lib.optionals disableUnshare [
"-DHAVE_UNSHARE=OFF"
];
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements