From 06f3076639a85720976822808a47e1f1a0770134 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Mon, 8 Mar 2021 22:54:25 +0700 Subject: [PATCH] cminpack: fix darwin build --- pkgs/development/libraries/cminpack/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/cminpack/default.nix b/pkgs/development/libraries/cminpack/default.nix index 39d4849f3801..10d068604369 100644 --- a/pkgs/development/libraries/cminpack/default.nix +++ b/pkgs/development/libraries/cminpack/default.nix @@ -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; }; }