7 autoSignDarwinBinariesHook,
10 stdenv.mkDerivation rec {
15 url = "mirror://sourceforge/project/lpsolve/lpsolve/${version}/lp_solve_${version}_source.tar.gz";
16 sha256 = "sha256-bUq/9cxqqpM66ObBeiJt8PwLZxxDj2lxXUHQn+gfkC8=";
20 lib.optionals stdenv.hostPlatform.isDarwin [
24 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
25 autoSignDarwinBinariesHook
30 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";
32 // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) {
33 NIX_LDFLAGS = "-headerpad_max_install_names";
40 ccc = if stdenv.hostPlatform.isDarwin then "ccc.osx" else "ccc";
45 (cd lpsolve55 && bash -x -e ${ccc})
46 (cd lp_solve && bash -x -e ${ccc})
54 install -d -m755 $out/bin $out/lib $out/include/lpsolve
55 install -m755 lp_solve/bin/*/lp_solve -t $out/bin
56 install -m644 lpsolve55/bin/*/liblpsolve* -t $out/lib
57 install -m644 lp_*.h -t $out/include/lpsolve
59 rm $out/lib/liblpsolve*.a
60 rm $out/include/lpsolve/lp_solveDLL.h # A Windows header
66 description = "Mixed Integer Linear Programming (MILP) solver";
67 mainProgram = "lp_solve";
68 homepage = "https://lpsolve.sourceforge.net";
69 license = licenses.gpl2Plus;
70 maintainers = with maintainers; [ smironov ];
71 platforms = platforms.unix;