2015-06-20 14:30:03 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "lp_solve";
|
2018-02-27 05:57:53 +00:00
|
|
|
version = "5.5.2.5";
|
2015-06-20 14:30:03 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-05-04 14:17:37 +01:00
|
|
|
url = "mirror://sourceforge/project/lpsolve/lpsolve/${version}/lp_solve_${version}_source.tar.gz";
|
2018-02-27 05:57:53 +00:00
|
|
|
sha256 = "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0";
|
2015-06-20 14:30:03 +01:00
|
|
|
};
|
|
|
|
|
2016-05-04 11:57:43 +01:00
|
|
|
patches = [ ./isnan.patch ];
|
|
|
|
|
2015-06-20 14:30:03 +01:00
|
|
|
buildCommand = ''
|
|
|
|
. $stdenv/setup
|
|
|
|
tar xvfz $src
|
|
|
|
(
|
2016-05-04 11:57:43 +01:00
|
|
|
cd lp_solve*
|
|
|
|
eval patchPhase
|
|
|
|
)
|
|
|
|
(
|
2015-06-20 14:30:03 +01:00
|
|
|
cd lp_solve*/lpsolve55
|
|
|
|
bash ccc
|
|
|
|
mkdir -pv $out/lib
|
2020-09-11 11:18:58 +01:00
|
|
|
find bin -type f -exec cp -v "{}" $out/lib \;
|
2015-06-20 14:30:03 +01:00
|
|
|
)
|
|
|
|
(
|
|
|
|
cd lp_solve*/lp_solve
|
|
|
|
bash ccc
|
|
|
|
mkdir -pv $out/bin
|
2020-09-11 11:18:58 +01:00
|
|
|
find bin -type f -exec cp -v "{}" $out/bin \;
|
2015-06-20 14:30:03 +01:00
|
|
|
)
|
|
|
|
(
|
|
|
|
mkdir -pv $out/include
|
|
|
|
cp -v lp_solve*/*.h $out/include
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2016-05-04 14:03:22 +01:00
|
|
|
description = "A Mixed Integer Linear Programming (MILP) solver";
|
2015-06-20 14:30:03 +01:00
|
|
|
homepage = "http://lpsolve.sourceforge.net";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ smironov ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|