summary refs log tree commit diff
path: root/pkgs/development/python-modules/cppe
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2021-11-29 20:02:34 +0000
committerRobert Scott <code@humanleg.org.uk>2021-11-29 20:29:48 +0000
commitf2ce374855a063a17c7940011b28f20ae5079081 (patch)
tree8552a5069322e084057557e5cbeb8d0207d5d1a5 /pkgs/development/python-modules/cppe
parent7cbda5539d48d899d99d9f77cfc0c305d07ef161 (diff)
downloadnixpkgs-f2ce374855a063a17c7940011b28f20ae5079081.tar
nixpkgs-f2ce374855a063a17c7940011b28f20ae5079081.tar.gz
nixpkgs-f2ce374855a063a17c7940011b28f20ae5079081.tar.bz2
nixpkgs-f2ce374855a063a17c7940011b28f20ae5079081.tar.lz
nixpkgs-f2ce374855a063a17c7940011b28f20ae5079081.tar.xz
nixpkgs-f2ce374855a063a17c7940011b28f20ae5079081.tar.zst
nixpkgs-f2ce374855a063a17c7940011b28f20ae5079081.zip
python3Packages.cppe: fix build with clang
Diffstat (limited to 'pkgs/development/python-modules/cppe')
-rw-r--r--pkgs/development/python-modules/cppe/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/cppe/default.nix b/pkgs/development/python-modules/cppe/default.nix
index df00bd8dd12..52031bab74f 100644
--- a/pkgs/development/python-modules/cppe/default.nix
+++ b/pkgs/development/python-modules/cppe/default.nix
@@ -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