rPackages.pbdZMQ: fix package loading on Darwin

This commit is contained in:
Mitsuhiro Nakamura 2018-02-09 13:34:19 +09:00
parent 0cdc0ac3a1
commit c4658ac0a4

View File

@ -285,7 +285,7 @@ let
pbdMPI = [ pkgs.openmpi ];
pbdNCDF4 = [ pkgs.netcdf ];
pbdPROF = [ pkgs.openmpi ];
pbdZMQ = [ pkgs.which ];
pbdZMQ = lib.optionals stdenv.isDarwin [ pkgs.which ];
pdftools = [ pkgs.poppler.dev ];
PKI = [ pkgs.openssl.dev ];
png = [ pkgs.libpng.dev ];
@ -393,6 +393,7 @@ let
nat = [ pkgs.which ];
nat_nblast = [ pkgs.which ];
nat_templatebrains = [ pkgs.which ];
pbdZMQ = lib.optionals stdenv.isDarwin [ pkgs.binutils.bintools ];
RMark = [ pkgs.which ];
RPushbullet = [ pkgs.which ];
qtpaint = [ pkgs.cmake ];
@ -776,6 +777,14 @@ let
PKG_LIBS = "-L${pkgs.openblasCompat}/lib -lopenblas";
});
pbdZMQ = old.pbdZMQ.overrideDerivation (attrs: {
postPatch = lib.optionalString stdenv.isDarwin ''
for file in R/*.{r,r.in}; do
sed -i 's#system("which \(\w\+\)"[^)]*)#"${pkgs.binutils.bintools}/bin/\1"#g' $file
done
'';
});
qtbase = old.qtbase.overrideDerivation (attrs: {
patches = [ ./patches/qtbase.patch ];
});