rPackages.ModelMetrics: fix darwin build

This fixes the error:

	auc_.cpp:2:10: fatal error: 'omp.h' file not found
	#include <omp.h>
This commit is contained in:
Nick Partridge 2019-10-31 10:00:25 +10:00
parent 17da09c2fa
commit f21ac0e4dc

View file

@ -277,6 +277,7 @@ let
KFKSDS = [ pkgs.gsl_1 ];
kza = [ pkgs.fftw.dev ];
magick = [ pkgs.imagemagick.dev ];
ModelMetrics = lib.optional stdenv.isDarwin pkgs.llvmPackages.openmp;
mvabund = [ pkgs.gsl_1 ];
mwaved = [ pkgs.fftw.dev ];
ncdf4 = [ pkgs.netcdf ];
@ -735,6 +736,11 @@ let
+ lib.optionalString stdenv.isDarwin " -fopenmp";
});
ModelMetrics = old.ModelMetrics.overrideDerivation (attrs: {
NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE
+ lib.optionalString stdenv.isDarwin " -fopenmp";
});
rpf = old.rpf.overrideDerivation (attrs: {
patchPhase = "patchShebangs configure";
});