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; }; }