2021-02-05 17:12:51 +00:00
|
|
|
{lib, stdenv, fetchurl}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-26 17:43:05 +00:00
|
|
|
pname = "cminpack";
|
|
|
|
version = "1.3.6";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-12-26 17:43:05 +00:00
|
|
|
url = "http://devernay.free.fr/hacks/cminpack/cminpack-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "17yh695aim508x1kn9zf6g13jxwk3pi3404h5ix4g5lc60hzs1rw";
|
|
|
|
};
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
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'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib $out/include
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://devernay.free.fr/hacks/cminpack/cminpack.html";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Software for solving nonlinear equations and nonlinear least squares problems";
|
2021-03-12 07:09:13 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|