rPackages.JuniperKernel: fix darwin build

This commit is contained in:
Mitsuhiro Nakamura 2018-02-26 10:00:00 +09:00
parent 3bae30289c
commit 671e3f5c4d

View File

@ -411,6 +411,7 @@ let
fftw = [ pkgs.pkgconfig ];
geoCount = [ pkgs.pkgconfig ];
gdtools = [ pkgs.pkgconfig ];
JuniperKernel = lib.optionals stdenv.isDarwin [ pkgs.binutils.bintools ];
kza = [ pkgs.pkgconfig ];
magick = [ pkgs.pkgconfig ];
mwaved = [ pkgs.pkgconfig ];
@ -760,6 +761,17 @@ let
'';
});
JuniperKernel = old.JuniperKernel.overrideDerivation (attrs: {
postPatch = ''
for file in {R,src}/*.R; do
sed -i 's#system("which \(otool\|install_name_tool\)"[^)]*)#"${pkgs.binutils.bintools}/bin/\1"#g' $file
done
'';
preConfigure = ''
patchShebangs configure
'';
});
Mposterior = old.Mposterior.overrideDerivation (attrs: {
PKG_LIBS = "-L${pkgs.openblasCompat}/lib -lopenblas";
});