Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{lib, stdenv, fetchurl}: 2 3stdenv.mkDerivation rec { 4 pname = "cminpack"; 5 version = "1.3.6"; 6 7 src = fetchurl { 8 url = "http://devernay.free.fr/hacks/cminpack/cminpack-${version}.tar.gz"; 9 sha256 = "17yh695aim508x1kn9zf6g13jxwk3pi3404h5ix4g5lc60hzs1rw"; 10 }; 11 12 postPatch = '' 13 substituteInPlace Makefile \ 14 --replace '/usr/local' '${placeholder "out"}' \ 15 --replace 'gcc' '${stdenv.cc.targetPrefix}cc' \ 16 --replace 'ranlib -t' '${stdenv.cc.targetPrefix}ranlib' \ 17 --replace 'ranlib' '${stdenv.cc.targetPrefix}ranlib' 18 ''; 19 20 preInstall = '' 21 mkdir -p $out/lib $out/include 22 ''; 23 24 meta = { 25 homepage = "http://devernay.free.fr/hacks/cminpack/cminpack.html"; 26 license = lib.licenses.bsd3; 27 description = "Software for solving nonlinear equations and nonlinear least squares problems"; 28 platforms = lib.platforms.all; 29 }; 30 31}