rpm: add openmp when building with clang

The Darwin build has been broken with a missing header file "omp.h";
llvmPackages.openmp provides it.

Including this library is only necessary when clang is used.
This commit is contained in:
Ted Reed 2020-09-09 21:40:28 -07:00
parent 940195c0e7
commit b8e0f0cd72

View File

@ -1,6 +1,6 @@
{ stdenv, lib
, pkgconfig, autoreconfHook
, fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libarchive, nspr, nss, popt, db, xz, python, lua
, fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libarchive, nspr, nss, popt, db, xz, python, lua, llvmPackages
}:
stdenv.mkDerivation rec {
@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "man" ];
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ];
buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ]
++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ]