From b8e0f0cd723acab5cac53e72e704369bcb0c6474 Mon Sep 17 00:00:00 2001 From: Ted Reed Date: Wed, 9 Sep 2020 21:40:28 -0700 Subject: [PATCH] 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. --- pkgs/tools/package-management/rpm/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index fee282de52f..8acf57570d7 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/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 { @@ -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 ]