From 671e3f5c4db0e9346ca52f29ce19e836bb3f325c Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Mon, 26 Feb 2018 10:00:00 +0900 Subject: [PATCH] rPackages.JuniperKernel: fix darwin build --- pkgs/development/r-modules/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 9ff7d1da71b2..d22d5bebc427 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -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"; });