15 stdenv.mkDerivation rec {
17 version = "0-unstable-2024-08-28";
20 url = "https://digidev.digi.e-technik.uni-kassel.de/git/scalp.git";
21 # mirrored at https://git.sr.ht/~weijia/scalp
22 rev = "4a8e8b850a57328d9377ea7955c27c437394ebd3";
23 hash = "sha256-6OEf3yWFBmTKgeTMojRMRf/t9Ec1i851Lx3mQjCeOuw=";
28 substituteInPlace CMakeLists.txt \
29 --replace-fail "\''$ORIGIN" "\''${CMAKE_INSTALL_PREFIX}/lib" \
30 --replace-fail "-m64" ""
31 substituteInPlace src/tests/CMakeLists.txt \
32 --replace-fail "src/tests/" ""
34 + lib.optionalString withGurobi ''
35 substituteInPlace CMakeExtensions/FindGurobi.cmake \
36 --replace-fail "\''${GUROBI_VERSION}" '"${lib.versions.major gurobi.version}${lib.versions.minor gurobi.version}"'
44 lib.optionals withGurobi [
47 ++ lib.optionals withCplex [
50 ++ lib.optionals withLpsolve [
56 (lib.cmakeBool "BUILD_TESTS" doCheck)
58 ++ lib.optionals withGurobi [
59 (lib.cmakeFeature "GUROBI_ROOT_DIR" "${gurobi}")
61 ++ lib.optionals withCplex [
62 (lib.cmakeFeature "CPLEX_ROOT_DIR" "${cplex}")
64 ++ lib.optionals withLpsolve [
65 (lib.cmakeFeature "LPSOLVE_ROOT_DIR" "${lp_solve}")
70 passthru.updateScript = unstableGitUpdater { };
73 description = "Scalable Linear Programming Library";
74 mainProgram = "scalp";
75 homepage = "https://digidev.digi.e-technik.uni-kassel.de/scalp/";
76 license = lib.licenses.lgpl3Only;
77 platforms = lib.platforms.unix;
78 maintainers = with lib.maintainers; [ wegank ];