cminpack: fix darwin build

This commit is contained in:
Ben Siraphob 2021-03-08 22:54:25 +07:00
parent 9ed137b640
commit 06f3076639

View file

@ -8,8 +8,12 @@ stdenv.mkDerivation rec {
sha256 = "17yh695aim508x1kn9zf6g13jxwk3pi3404h5ix4g5lc60hzs1rw";
};
patchPhase = ''
sed -i s,/usr/local,$out, Makefile
postPatch = ''
substituteInPlace Makefile \
--replace '/usr/local' '${placeholder "out"}' \
--replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
--replace 'ranlib -t' '${stdenv.cc.targetPrefix}ranlib' \
--replace 'ranlib' '${stdenv.cc.targetPrefix}ranlib'
'';
preInstall = ''
@ -20,7 +24,7 @@ stdenv.mkDerivation rec {
homepage = "http://devernay.free.fr/hacks/cminpack/cminpack.html";
license = lib.licenses.bsd3;
description = "Software for solving nonlinear equations and nonlinear least squares problems";
platforms = lib.platforms.linux;
platforms = lib.platforms.all;
};
}