6 , autoSignDarwinBinariesHook
9 stdenv.mkDerivation rec {
14 url = "mirror://sourceforge/project/lpsolve/lpsolve/${version}/lp_solve_${version}_source.tar.gz";
15 sha256 = "sha256-bUq/9cxqqpM66ObBeiJt8PwLZxxDj2lxXUHQn+gfkC8=";
18 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
21 ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
22 autoSignDarwinBinariesHook
26 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";
27 } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) {
28 NIX_LDFLAGS = "-headerpad_max_install_names";
35 ccc = if stdenv.hostPlatform.isDarwin then "ccc.osx" else "ccc";
40 (cd lpsolve55 && bash -x -e ${ccc})
41 (cd lp_solve && bash -x -e ${ccc})
49 install -d -m755 $out/bin $out/lib $out/include/lpsolve
50 install -m755 lp_solve/bin/*/lp_solve -t $out/bin
51 install -m644 lpsolve55/bin/*/liblpsolve* -t $out/lib
52 install -m644 lp_*.h -t $out/include/lpsolve
54 rm $out/lib/liblpsolve*.a
55 rm $out/include/lpsolve/lp_solveDLL.h # A Windows header
61 description = "Mixed Integer Linear Programming (MILP) solver";
62 mainProgram = "lp_solve";
63 homepage = "https://lpsolve.sourceforge.net";
64 license = licenses.gpl2Plus;
65 maintainers = with maintainers; [ smironov ];
66 platforms = platforms.unix;