From 74cd14978e5c4212e295e4e92bca3d5fe1a895b3 Mon Sep 17 00:00:00 2001 From: fettgoenner Date: Fri, 28 Mar 2025 16:03:06 +0100 Subject: [PATCH 1/7] scipopt-soplex: init at 7.1.3 --- pkgs/by-name/sc/scipopt-soplex/package.nix | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/sc/scipopt-soplex/package.nix diff --git a/pkgs/by-name/sc/scipopt-soplex/package.nix b/pkgs/by-name/sc/scipopt-soplex/package.nix new file mode 100644 index 000000000000..ab79ae825c21 --- /dev/null +++ b/pkgs/by-name/sc/scipopt-soplex/package.nix @@ -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; + }; +}) From 4c84f4f3b455bc487dbae898e9e1759aa2067125 Mon Sep 17 00:00:00 2001 From: fettgoenner Date: Fri, 28 Mar 2025 16:03:41 +0100 Subject: [PATCH 2/7] scipopt-papilo: init at 2.4.1 --- pkgs/by-name/sc/scipopt-papilo/package.nix | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pkgs/by-name/sc/scipopt-papilo/package.nix diff --git a/pkgs/by-name/sc/scipopt-papilo/package.nix b/pkgs/by-name/sc/scipopt-papilo/package.nix new file mode 100644 index 000000000000..9f0581f4f575 --- /dev/null +++ b/pkgs/by-name/sc/scipopt-papilo/package.nix @@ -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"; + }; +} From 7046d4d071787b9b0e9d14a2f02c9f3dfd187d4b Mon Sep 17 00:00:00 2001 From: fettgoenner Date: Fri, 28 Mar 2025 16:04:14 +0100 Subject: [PATCH 3/7] scipopt-zimpl: init at 3.6.2 --- pkgs/by-name/sc/scipopt-zimpl/package.nix | 75 +++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 pkgs/by-name/sc/scipopt-zimpl/package.nix diff --git a/pkgs/by-name/sc/scipopt-zimpl/package.nix b/pkgs/by-name/sc/scipopt-zimpl/package.nix new file mode 100644 index 000000000000..d0e768b3e7ac --- /dev/null +++ b/pkgs/by-name/sc/scipopt-zimpl/package.nix @@ -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"; + }; +} From ca8edebf6115863bbd2f32bd7b0c7648ad68ed65 Mon Sep 17 00:00:00 2001 From: fettgoenner Date: Fri, 28 Mar 2025 16:05:07 +0100 Subject: [PATCH 4/7] scipopt-scip: init at 9.2.1 --- pkgs/by-name/sc/scipopt-scip/package.nix | 61 ++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pkgs/by-name/sc/scipopt-scip/package.nix diff --git a/pkgs/by-name/sc/scipopt-scip/package.nix b/pkgs/by-name/sc/scipopt-scip/package.nix new file mode 100644 index 000000000000..c4939120ae08 --- /dev/null +++ b/pkgs/by-name/sc/scipopt-scip/package.nix @@ -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"; + }; +} From 2cb408c0b0298bfe6635366394335c7653b42de6 Mon Sep 17 00:00:00 2001 From: fettgoenner Date: Fri, 28 Mar 2025 16:05:44 +0100 Subject: [PATCH 5/7] scipopt-gcg: init at 3.7.1 --- pkgs/by-name/sc/scipopt-gcg/package.nix | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/sc/scipopt-gcg/package.nix diff --git a/pkgs/by-name/sc/scipopt-gcg/package.nix b/pkgs/by-name/sc/scipopt-gcg/package.nix new file mode 100644 index 000000000000..bd55fcb22c17 --- /dev/null +++ b/pkgs/by-name/sc/scipopt-gcg/package.nix @@ -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"; + }; +} From 13964df9c5c458bba3072ca358854f42ba6a4616 Mon Sep 17 00:00:00 2001 From: fettgoenner Date: Fri, 28 Mar 2025 16:06:30 +0100 Subject: [PATCH 6/7] scipopt-ug: init at 1.0.0-beta6 --- pkgs/by-name/sc/scipopt-ug/package.nix | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/sc/scipopt-ug/package.nix diff --git a/pkgs/by-name/sc/scipopt-ug/package.nix b/pkgs/by-name/sc/scipopt-ug/package.nix new file mode 100644 index 000000000000..5905ce388596 --- /dev/null +++ b/pkgs/by-name/sc/scipopt-ug/package.nix @@ -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"; + }; +} From b014873d0034472b0cf36c6d030e3db91af36cf4 Mon Sep 17 00:00:00 2001 From: fettgoenner Date: Fri, 28 Mar 2025 16:28:47 +0100 Subject: [PATCH 7/7] maintainers: add fettgoenner --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index be1e8934e57a..bfc5eb600add 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7844,6 +7844,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";