forked from mirrors/nixpkgs
rpm: compile --with-cap
Without that, RPM is unable to handle packages that require `rpmlib(FileCaps)`; example error message trying to install Fedora 36 shadow-utils: `rpmlib(FileCaps) <= 4.6.1-1 is needed by shadow-utils`.
This commit is contained in:
parent
1fc760e913
commit
b4a0bdcf92
|
@ -1,7 +1,7 @@
|
|||
{ stdenv, lib
|
||||
, pkg-config, autoreconfHook
|
||||
, fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libgcrypt, libarchive, nspr, nss, popt, db, xz, python, lua, llvmPackages
|
||||
, sqlite, zstd, fetchpatch
|
||||
, sqlite, zstd, fetchpatch, libcap
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ cpio zlib zstd bzip2 file libarchive libgcrypt nspr nss db xz python lua sqlite ]
|
||||
++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
|
||||
++ lib.optional stdenv.cc.isClang llvmPackages.openmp
|
||||
++ lib.optional stdenv.isLinux libcap;
|
||||
|
||||
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
|
||||
propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ]
|
||||
|
@ -35,7 +36,7 @@ stdenv.mkDerivation rec {
|
|||
"--enable-zstd"
|
||||
"--localstatedir=/var"
|
||||
"--sharedstatedir=/com"
|
||||
];
|
||||
] ++ lib.optional stdenv.isLinux "--with-cap";
|
||||
|
||||
patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Fix build for macOS aarch64
|
||||
(fetchpatch {
|
||||
|
|
Loading…
Reference in a new issue