Skip to content

Commit

Permalink
rpm: add openmp when building with clang
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
treed committed Sep 10, 2020
1 parent 940195c commit b8e0f0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkgs/tools/package-management/rpm/default.nix
@@ -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 {
Expand All @@ -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 ]
Expand Down

0 comments on commit b8e0f0c

Please sign in to comment.