scipoptsuite: init at 9.2.1 (#374527)

This commit is contained in:
Arne Keller 2025-03-29 12:22:33 +01:00 committed by GitHub
commit 5b4ac0fab3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 359 additions and 0 deletions

View File

@ -7851,6 +7851,12 @@
githubId = 11705326;
name = "Max Kochurov";
};
fettgoenner = {
email = "paulmatti@protonmail.com";
github = "fettgoenner";
githubId = 92429150;
name = "Paul Meinhold";
};
ffinkdevs = {
email = "fink@h0st.space";
github = "ffinkdevs";

View File

@ -0,0 +1,65 @@
{
lib,
pkgs,
stdenv,
fetchFromGitHub,
cmake,
scipopt-scip,
cliquer,
gsl,
gmp,
bliss,
nauty,
}:
stdenv.mkDerivation rec {
pname = "scipopt-gcg";
version = "371";
# To correlate scipVersion and version, check: https://scipopt.org/#news
scipVersion = "9.2.1";
src = fetchFromGitHub {
owner = "scipopt";
repo = "gcg";
tag = "v${version}";
hash = "sha256-+rD8tGE49Irg9xZTD3Ay87ISSeRI4kbBpCj5ppyENbo=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
scipopt-scip
cliquer
gsl
gmp
bliss
nauty
];
# Fixing the error
# > CMake Error at CMakeLists.txt:236 (find_package):
# > By not providing "FindNAUTY.cmake" in CMAKE_MODULE_PATH this project has
# > asked CMake to find a package configuration file provided by "NAUTY", but
# > CMake did not find one.
# with this weird workaround of setting SCIPOptSuite_SOURCE_DIR to include the scipopt-scip source
# files via symlinks, so the specific nauty files are found:
preConfigure = ''
mkdir -pv $out/scip
ln -sv ${scipopt-scip.src}/src/ $out/scip/src
cmakeFlagsArray+=(
"-DSCIPOptSuite_SOURCE_DIR=$out"
)
'';
doCheck = true;
meta = {
maintainers = with lib.maintainers; [ fettgoenner ];
changelog = "https://scipopt.org/doc-${scipVersion}/html/RN${lib.versions.major scipVersion}.php";
description = "Branch-and-Price & Column Generation for Everyone";
license = lib.licenses.lgpl3Plus;
homepage = "https://gcg.zib.de";
mainProgram = "gcg";
};
}

View File

@ -0,0 +1,59 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
boost,
blas,
gmp,
tbb_2021_11,
gfortran,
}:
stdenv.mkDerivation rec {
pname = "scipopt-papilo";
version = "2.4.1";
# To correlate scipVersion and version, check: https://scipopt.org/#news
scipVersion = "9.2.1";
src = fetchFromGitHub {
owner = "scipopt";
repo = "papilo";
tag = "v${version}";
hash = "sha256-oQ9iq5UkFK0ghUx6uxdJIOo5niQjniHegSZptqi2fgE=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
blas
gmp
gfortran
boost
tbb_2021_11
];
cmakeFlags = [
# Disable automatic download of TBB.
(lib.cmakeBool "TBB_DOWNLOAD" false)
# Explicitly disable SoPlex as a built-in back-end solver to avoid this error:
# > include/boost/multiprecision/mpfr.hpp:22: fatal error: mpfr.h: No such file or directory
# > compilation terminated.
(lib.cmakeBool "SOPLEX" false)
# (lib.cmakeBool "GMP" true)
# (lib.cmakeBool "QUADMATH" true)
# (lib.cmakeBool "TBB" true)
];
doCheck = true;
meta = {
maintainers = with lib.maintainers; [ fettgoenner ];
changelog = "https://scipopt.org/doc-${scipVersion}/html/RN${lib.versions.major scipVersion}.php";
description = "Parallel Presolve for Integer and Linear Optimization";
license = lib.licenses.lgpl3Plus;
homepage = "https://github.com/scipopt/papilo";
mainProgram = "papilo";
};
}

View File

@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchzip,
fetchFromGitHub,
cmake,
zlib,
readline,
gmp,
scipopt-soplex,
scipopt-papilo,
scipopt-zimpl,
ipopt,
tbb_2021_11,
boost,
gfortran,
criterion,
mpfr,
}:
stdenv.mkDerivation rec {
pname = "scipopt-scip";
version = "9.2.1";
src = fetchFromGitHub {
owner = "scipopt";
repo = "scip";
tag = "v${lib.replaceStrings [ "." ] [ "" ] version}";
hash = "sha256-xYxbMZYYqFNInlct8Ju0SrksfJlwV9Q+AHjxq7xhfAs=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
scipopt-soplex
scipopt-papilo
scipopt-zimpl
ipopt
gmp
readline
zlib
tbb_2021_11
boost
gfortran
criterion
mpfr # if not included, throws fatal error: mpfr.h not found
];
cmakeFlags = [ ];
doCheck = true;
meta = {
maintainers = with lib.maintainers; [ fettgoenner ];
changelog = "https://scipopt.org/doc-${version}/html/RN${lib.versions.major version}.php";
description = "Solving Constraint Integer Programs";
license = lib.licenses.asl20;
homepage = "https://github.com/scipopt/scip";
mainProgram = "scip";
};
}

View File

@ -0,0 +1,48 @@
{
lib,
stdenv,
cmake,
gmp,
mpfr,
zlib,
boost,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "scipopt-soplex";
version = "713";
# To correlate scipVersion and version, check: https://scipopt.org/#news
scipVersion = "9.2.1";
src = fetchFromGitHub {
owner = "scipopt";
repo = "soplex";
rev = "release-${builtins.replaceStrings [ "." ] [ "" ] finalAttrs.version}";
hash = "sha256-qI7VGPAm3ALzeiD/OgvlZ1w2GzHRYdBajTW5XdIN9pU=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
boost
gmp
mpfr
zlib
];
strictDeps = true;
doCheck = true;
meta = {
homepage = "https://soplex.zib.de/";
description = "Sequential object-oriented simPlex";
license = with lib.licenses; [ asl20 ];
mainProgram = "soplex";
maintainers = with lib.maintainers; [ david-r-cox ];
changelog = "https://scipopt.org/doc-${finalAttrs.scipVersion}/html/RN${lib.versions.major finalAttrs.scipVersion}.php";
platforms = lib.platforms.unix;
};
})

View File

@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchzip,
cmake,
scipopt-scip,
zlib,
mpi,
}:
stdenv.mkDerivation rec {
pname = "scipopt-ug";
version = "1.0.0-beta6";
# To correlate scipVersion and version, check: https://scipopt.org/#news
scipVersion = "9.2.1";
# Take the SCIPOptSuite source since no other source exists publicly.
src = fetchzip {
url = "https://github.com/scipopt/scip/releases/download/v${
lib.replaceStrings [ "." ] [ "" ] scipVersion
}/scipoptsuite-${scipVersion}.tgz";
sha256 = "sha256-Hi6oDPtJZODTBIuRYE62sUMTJqfmF0flY3cGoWh2IZE=";
};
sourceRoot = "${src.name}/ug";
nativeBuildInputs = [
cmake
];
buildInputs = [
scipopt-scip
mpi
zlib
];
meta = {
maintainers = with lib.maintainers; [ fettgoenner ];
changelog = "https://scipopt.org/doc-${scipVersion}/html/RN${lib.versions.major scipVersion}.php";
description = "Ubiquity Generator framework to parallelize branch-and-bound based solvers";
license = lib.licenses.lgpl3Plus;
homepage = "https://ug.zib.de";
};
}

View File

@ -0,0 +1,75 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
bison,
flex,
gmp,
zlib,
}:
stdenv.mkDerivation rec {
pname = "scipopt-zimpl";
version = "362";
# To correlate scipVersion and version, check: https://scipopt.org/#news
scipVersion = "9.2.1";
src = fetchFromGitHub {
owner = "scipopt";
repo = "zimpl";
tag = "v${version}";
sha256 = "juqAwzqBArsFXmz7L7RQaE78EhQdP5P51wQFlCoo7/o=";
};
postPatch = ''
chmod +x check/check.sh
'';
nativeBuildInputs = [
cmake
bison
flex
];
buildInputs = [
gmp
zlib
];
doCheck = true;
checkPhase = ''
runHook preCheck
pushd ../check
./check.sh ../build/bin/zimpl
popd
runHook postCheck
'';
meta = {
maintainers = with lib.maintainers; [ fettgoenner ];
changelog = "https://scipopt.org/doc-${scipVersion}/html/RN${lib.versions.major scipVersion}.php";
description = "Zuse Institut Mathematical Programming Language";
longDescription = ''
ZIMPL is a little language to translate the mathematical model of a
problem into a linear or (mixed-)integer mathematical program
expressed in .lp or .mps file format which can be read by a LP or MIP
solver.
If you use Zimpl for research and publish results, the best way
to refer to Zimpl is to cite my Ph.d. thesis:
@PHDTHESIS{Koch2004,
author = "Thorsten Koch",
title = "Rapid Mathematical Programming",
year = "2004",
school = "Technische {Universit\"at} Berlin",
url = "http://www.zib.de/Publications/abstracts/ZR-04-58/",
note = "ZIB-Report 04-58",
}
'';
license = lib.licenses.lgpl3Plus;
homepage = "https://zimpl.zib.de";
mainProgram = "zimpl";
};
}