diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index 3f266c11bdfbc..ff427b7e4fc94 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/pkgs/tools/package-management/rpm/default.nix @@ -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