forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
50 lines
1 KiB
Nix
50 lines
1 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lp_solve";
|
|
version = "5.5.2.5";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/project/lpsolve/lpsolve/${version}/lp_solve_${version}_source.tar.gz";
|
|
sha256 = "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0";
|
|
};
|
|
|
|
patches = [ ./isnan.patch ];
|
|
|
|
buildCommand = ''
|
|
. $stdenv/setup
|
|
tar xvfz $src
|
|
(
|
|
cd lp_solve*
|
|
eval patchPhase
|
|
)
|
|
(
|
|
cd lp_solve*/lpsolve55
|
|
bash ccc
|
|
mkdir -pv $out/lib
|
|
find bin -type f -exec cp -v "{}" $out/lib \;
|
|
)
|
|
(
|
|
cd lp_solve*/lp_solve
|
|
bash ccc
|
|
mkdir -pv $out/bin
|
|
find bin -type f -exec cp -v "{}" $out/bin \;
|
|
)
|
|
(
|
|
mkdir -pv $out/include
|
|
cp -v lp_solve*/*.h $out/include
|
|
)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A Mixed Integer Linear Programming (MILP) solver";
|
|
homepage = "http://lpsolve.sourceforge.net";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ smironov ];
|
|
platforms = platforms.unix;
|
|
};
|
|
|
|
}
|
|
|