mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
Merge pull request #147935 from risicle/ris-cppe-clang
cppe, python3Packages.cppe: fix build with clang
This commit is contained in:
commit
7f8ebc6d42
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake }:
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, llvmPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cppe";
|
||||
@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-guM7+ZWDJLcAUJtPkKLvC4LYSA2eBvER7cgwPZ7FxHw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [ cmake ]
|
||||
++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ buildPythonPackage
|
||||
, lib
|
||||
, stdenv
|
||||
, cmake
|
||||
, cppe
|
||||
, eigen
|
||||
@ -12,6 +13,7 @@
|
||||
, pandas
|
||||
, polarizationsolver
|
||||
, pytest
|
||||
, llvmPackages
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -31,7 +33,12 @@ buildPythonPackage rec {
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
buildInputs = [ pybind11 ];
|
||||
buildInputs = [ pybind11 ]
|
||||
++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
|
||||
|
||||
NIX_CFLAGS_LINK = lib.optional stdenv.cc.isClang "-lomp";
|
||||
|
||||
hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
|
||||
|
||||
checkInputs = [
|
||||
pytest
|
||||
|
Loading…
Reference in New Issue
Block a user