13 stdenv.mkDerivation rec {
15 version = "unstable-2022-03-15";
18 url = "https://digidev.digi.e-technik.uni-kassel.de/git/scalp.git";
19 # mirrored at https://git.sr.ht/~weijia/scalp
20 rev = "185b84e4ff967f42cf2de5db4db4e6fa0cc18fb8";
21 hash = "sha256-NyMZdJwdD3FR6uweYCclJjfcf3Y24Bns1ViwsmJ5izg=";
28 buildInputs = lib.optionals withGurobi [
30 ] ++ lib.optionals withCplex [
32 ] ++ lib.optionals withLpsolve [
36 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
37 substituteInPlace CMakeLists.txt \
38 --replace "\''$ORIGIN" "\''${CMAKE_INSTALL_PREFIX}/lib"
42 "-DBUILD_TESTS=${lib.boolToString doCheck}"
43 ] ++ lib.optionals withGurobi [
44 "-DGUROBI_DIR=${gurobi}"
45 ] ++ lib.optionals withCplex [
46 "-DCPLEX_DIR=${cplex}"
52 description = "Scalable Linear Programming Library";
53 mainProgram = "scalp";
54 homepage = "https://digidev.digi.e-technik.uni-kassel.de/scalp/";
55 license = licenses.lgpl3;
56 platforms = platforms.unix;
57 maintainers = with maintainers; [ wegank ];