From baa1fd0958af059dc4fa350ed6136aedfc942cdf Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 6 May 2026 18:29:35 -0400 Subject: [PATCH 1/8] maintainers: add coolcuber --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8e9718c9baea..d50755e13e24 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5496,6 +5496,12 @@ githubId = 32609395; name = "B YI"; }; + coolcuber = { + email = "rpgeorg@clemson.edu"; + github = "coolcuber"; + githubId = 35880825; + name = "Ross George"; + }; coolGi = { email = "me@coolgi.dev"; github = "coolGi69"; From aa65d6f3cb27593fbc426023fd44cd6a1a1267b7 Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:22:38 -0400 Subject: [PATCH 2/8] topcom: init at 1.1.2 --- pkgs/by-name/to/topcom/package.nix | 83 ++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 pkgs/by-name/to/topcom/package.nix diff --git a/pkgs/by-name/to/topcom/package.nix b/pkgs/by-name/to/topcom/package.nix new file mode 100644 index 000000000000..38772035df8e --- /dev/null +++ b/pkgs/by-name/to/topcom/package.nix @@ -0,0 +1,83 @@ +{ + fetchpatch, + fetchzip, + lib, + stdenv, + + autoreconfHook, + cddlib, + gmpxx, + + programPrefix ? "topcom-", +}: +stdenv.mkDerivation (finalAttrs: { + pname = "topcom"; + version = "1.1.2"; + + versionUrl = builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version; + + src = fetchzip { + url = "https://www.wm.uni-bayreuth.de/de/team/rambau_joerg/TOPCOM-Downloads/TOPCOM-${finalAttrs.versionUrl}.tgz"; + hash = "sha256-r6dA2rQzxMu0Xxq5yl9rBZ5MJTRnmWVLav/F/QpkZ1A="; + }; + + buildInputs = [ + cddlib + gmpxx + ]; + + nativeBuildInputs = [ + autoreconfHook + ]; + + __structuredAttrs = true; + + strictDeps = true; + + patches = [ + (fetchpatch { + url = "https://gitlab.archlinux.org/archlinux/packaging/packages/topcom/-/raw/67c9a20c8e1597898f3950b486b4287641823363/system-libs.patch"; + hash = "sha256-F+1ZtluGL3i+LKWp0poQnx2ZlV5TSp6WSK5yl2FmOP4"; + }) + ]; + + postPatch = '' + substituteInPlace lib-src/Makefile.am lib-src-reg/Makefile.am src/Makefile.am src-reg/Makefile.am \ + --replace-fail '$(includedir)/cddlib' '${lib.getDev cddlib}/include/cddlib' + ''; + + configureFlags = [ + "--program-prefix=${programPrefix}" + ]; + + enableParallelBuilding = true; + + doCheck = true; + + installCheckPhase = '' + runHook preInstallCheck + for prog in $(find "$out/bin" -type f); do + echo "Checking $prog" + grep -q '^usage: ' <(echo "" | "$prog" 2>&1) && continue + "$prog" --help &>/dev/null && continue + echo "$prog doesn't seem to be working" >&2 + exit 1 + done + runHook postInstallCheck + ''; + + doInstallCheck = true; + + meta = { + description = "Package for computing Triangulations Of Point Configurations and Oriented Matroid"; + longDescription = '' + TOPCOM is a package for computing Triangulations Of Point Configurations + and Oriented Matroids. It was very much inspired by the maple program + PUNTOS, which was written by Jesus de Loera. TOPCOM is entirely written + in C++, so there is a significant speed up compared to PUNTOS. + ''; + homepage = "https://www.wm.uni-bayreuth.de/de/team/rambau_joerg/TOPCOM/index.html"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +}) From a513b83ffc07a6cfef861cc71932c9646d12b36f Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:24:42 -0400 Subject: [PATCH 3/8] memtailor: init at 1.3 --- pkgs/by-name/me/memtailor/package.nix | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/me/memtailor/package.nix diff --git a/pkgs/by-name/me/memtailor/package.nix b/pkgs/by-name/me/memtailor/package.nix new file mode 100644 index 000000000000..11fba610ce69 --- /dev/null +++ b/pkgs/by-name/me/memtailor/package.nix @@ -0,0 +1,55 @@ +{ + lib, + fetchFromGitHub, + stdenv, + + autoreconfHook, + gtest, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "memtailor"; + version = "1.3"; + + src = fetchFromGitHub { + owner = "Macaulay2"; + repo = "memtailor"; + tag = "v${finalAttrs.version}"; + hash = "sha256-x6z/BzU78od21l72ZAnX37UHHdyMHfJ6cjwJwNYOIcY="; + }; + + nativeBuildInputs = [ + autoreconfHook + ]; + + checkInputs = [ + gtest + ]; + + __structuredAttrs = true; + + strictDeps = true; + + configureFlags = [ + (lib.withFeature finalAttrs.doCheck "gtest") + ]; + + enableParallelBuilding = true; + + doCheck = true; + + meta = { + description = "C++ library of special purpose memory allocators"; + longDescription = '' + Memtailor is a C++ library of special purpose memory allocators. It + currently offers an arena allocator and a memory pool. + + The main motivation to use a memtailor allocator is better and more + predictable performance than you get with new/delete. Sometimes a + memtailor allocator can also be more convenient due to the ability to + free many allocations at one time. + ''; + homepage = "https://github.com/Macaulay2/memtailor"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +}) From 9154ee9bcc5610e83ddd89e5c6e0dcf23f3edd29 Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:32:52 -0400 Subject: [PATCH 4/8] cohomcalg: init at 0.32 --- pkgs/by-name/co/cohomcalg/fix-compilers.patch | 25 +++++++++ pkgs/by-name/co/cohomcalg/package.nix | 53 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 pkgs/by-name/co/cohomcalg/fix-compilers.patch create mode 100644 pkgs/by-name/co/cohomcalg/package.nix diff --git a/pkgs/by-name/co/cohomcalg/fix-compilers.patch b/pkgs/by-name/co/cohomcalg/fix-compilers.patch new file mode 100644 index 000000000000..f4359ca17074 --- /dev/null +++ b/pkgs/by-name/co/cohomcalg/fix-compilers.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -5,9 +5,10 @@ + ######################################################################### + + # compilers & flags +-CC := g++ ++CC ?= gcc ++CXX ?= g++ + CFLAGS := -O3 +-LD := g++ ++LD := $(CXX) + # Note: (1) If you want to enforce 32-bit or 64-bit compilation, + # add "-m32" or "-m64" to both CFLAGS and LDFLAGS. + # (2) If you want to enforce a static linking of all libraries +@@ -35,7 +36,7 @@ vpath %.cpp $(COHOMCALG_SRC_DIR) + # macros for .c/.cpp dirs + define make-goal-cpp + $1/%.o: %.cpp +- $(CC) $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c $$< -o $$@ ++ $(CXX) $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c $$< -o $$@ + endef + + define make-goal-c diff --git a/pkgs/by-name/co/cohomcalg/package.nix b/pkgs/by-name/co/cohomcalg/package.nix new file mode 100644 index 000000000000..de7f1bf24843 --- /dev/null +++ b/pkgs/by-name/co/cohomcalg/package.nix @@ -0,0 +1,53 @@ +{ + fetchFromGitHub, + fetchpatch, + lib, + stdenv, + + versionCheckHook, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "cohomcalg"; + version = "0.32"; + + src = fetchFromGitHub { + owner = "BenjaminJurke"; + repo = "cohomCalg"; + tag = "v${finalAttrs.version}"; + hash = "sha256-9kKKfb8STiCjaHiWgYEQsERNTnOXlwN8axIBJHg43zk="; + }; + + __structuredAttrs = true; + + strictDeps = true; + + patches = [ + (fetchpatch { + url = "https://github.com/BenjaminJurke/cohomCalg/commit/7aa864b5655c91eb2afc79c419bbf2bf8a4f791b.diff"; + hash = "sha256-JteQ3m2ELmMHaWCN9Sm954KKDn0ax8TywtbQ3dBWk80="; + }) + ./fix-compilers.patch + ]; + + enableParallelBuilding = true; + + installPhase = '' + runHook preInstall + install -D bin/cohomcalg $out/bin/cohomcalg + runHook postInstall + ''; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + doInstallCheck = true; + + meta = { + mainProgram = "cohomcalg"; + description = "Software package for computation of sheaf cohomologies for line bundles on toric varieties"; + homepage = "https://github.com/BenjaminJurke/cohomCalg"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +}) From 1dba638e858f0330887e5b88c46f76ccfb0f1b5d Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:33:42 -0400 Subject: [PATCH 5/8] frobby: init at 0.9.9 --- pkgs/by-name/fr/frobby/package.nix | 65 ++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/fr/frobby/package.nix diff --git a/pkgs/by-name/fr/frobby/package.nix b/pkgs/by-name/fr/frobby/package.nix new file mode 100644 index 000000000000..83a5ab0e2d41 --- /dev/null +++ b/pkgs/by-name/fr/frobby/package.nix @@ -0,0 +1,65 @@ +{ + lib, + stdenv, + fetchFromGitHub, + + gmp, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "frobby"; + version = "0.9.9"; + + src = fetchFromGitHub { + owner = "Macaulay2"; + repo = "frobby"; + tag = "v${finalAttrs.version}"; + hash = "sha256-LndLfORnypLqFgNMPEJ8jc2Fa2xWWgYS9rZ7gGFbwwo="; + }; + + buildInputs = [ + gmp + ]; + + __structuredAttrs = true; + + strictDeps = true; + + enableParallelBuilding = true; + + makeFlags = [ + "MODE=shared" + "PREFIX=${placeholder "out"}" + ]; + + buildFlags = [ + "all" + "library" + ]; + + preCheck = '' + patchShebangs --build ./test + ''; + + checkTarget = "test"; + + doCheck = true; + + meta = { + mainProgram = "frobby"; + description = "Software system and project for computations with monomial ideals"; + longDescription = '' + Current functionality includes Euler characteristic, Hilbert series, + maximal standard monomials, combinatorial optimization on monomial + ideals, primary decomposition, irreducible decomposition, Alexander dual, + associated primes, minimization and intersection of monomial ideals as + well as the computation of Frobenius problems (using 4ti2) with very + large numbers. Frobby is also able to translate between formats that can + be used with several different computer systems, such as Macaulay2, + Monos, 4ti2, CoCoA4 and Singular. Thus Frobby can be used with any of + those systems. + ''; + homepage = "https://github.com/Macaulay2/frobby"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +}) From 969b9869177e60e9a58117b2d0f8e95cee78f250 Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:34:23 -0400 Subject: [PATCH 6/8] mathic: init at 1.3 --- pkgs/by-name/ma/mathic/package.nix | 65 ++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/ma/mathic/package.nix diff --git a/pkgs/by-name/ma/mathic/package.nix b/pkgs/by-name/ma/mathic/package.nix new file mode 100644 index 000000000000..0c479abd798d --- /dev/null +++ b/pkgs/by-name/ma/mathic/package.nix @@ -0,0 +1,65 @@ +{ + lib, + fetchFromGitHub, + stdenv, + + autoreconfHook, + gtest, + memtailor, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "mathic"; + version = "1.3"; + + src = fetchFromGitHub { + owner = "Macaulay2"; + repo = "mathic"; + tag = "v${finalAttrs.version}"; + hash = "sha256-6xkNnn/8XugeBi91+9iTWHj8l5M6SH8tjsC8N2sLEnA="; + }; + + buildInputs = [ + memtailor + ]; + + nativeBuildInputs = [ + autoreconfHook + ]; + + checkInputs = [ + gtest + ]; + + configureFlags = [ + (lib.withFeature finalAttrs.doCheck "gtest") + ]; + + __structuredAttrs = true; + + strictDeps = true; + + enableParallelBuilding = true; + + doCheck = true; + + meta = { + description = "C++ library of fast data structures designed for use in Groebner basis computation"; + longDescription = '' + Mathic is a C++ library of fast data structures designed for use in + Groebner basis computation. This includes data structures for ordering + S-pairs, performing divisor queries and ordering polynomial terms during + polynomial reduction. With Mathic you get to use highly optimized code + with little effort so that you can focus more of your time on whatever + part of your Groebner basis implementation that you are interested in. + The data structures use templates to allow you to use them with whatever + representation of monomials/terms and coefficients that your code uses. + In fact the only places where Mathic defines its own monomials/terms is + in the test code and example code. Currently only dense representations + of terms/monomials are suitable since Mathic will frequently ask "what is + the exponent of variable number x in this term/monomial?". + ''; + homepage = "https://github.com/Macaulay2/mathic"; + license = lib.licenses.lgpl2Plus; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +}) From e3cdda3f3fdd79da76b6047928dd62fa1d135e38 Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:35:07 -0400 Subject: [PATCH 7/8] mathicgb: init at 1.3 --- pkgs/by-name/ma/mathicgb/package.nix | 62 ++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pkgs/by-name/ma/mathicgb/package.nix diff --git a/pkgs/by-name/ma/mathicgb/package.nix b/pkgs/by-name/ma/mathicgb/package.nix new file mode 100644 index 000000000000..984476a6e007 --- /dev/null +++ b/pkgs/by-name/ma/mathicgb/package.nix @@ -0,0 +1,62 @@ +{ + fetchFromGitHub, + lib, + stdenv, + + autoreconfHook, + gtest, + mathic, + memtailor, + onetbb, + pkg-config, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "mathicgb"; + version = "1.3"; + + src = fetchFromGitHub { + owner = "Macaulay2"; + repo = "mathicgb"; + tag = "v${finalAttrs.version}"; + hash = "sha256-zcHaYzznvbBkfeFXNxIxy9qlyD0esOvwUIOuEli4rwc="; + }; + + buildInputs = [ + mathic + memtailor + onetbb + ]; + + nativeBuildInputs = [ + autoreconfHook + pkg-config # clears up bad behavior of autoconf + ]; + + checkInputs = [ + gtest + ]; + + __structuredAttrs = true; + + strictDeps = true; + + configureFlags = [ + (lib.withFeature finalAttrs.doCheck "gtest") + ]; + + enableParallelBuilding = true; + + doCheck = true; + + meta = { + mainProgram = "mgb"; + description = "Program for computing Groebner basis and signature Grobner bases"; + longDescription = '' + Mathicgb is a program for computing Groebner basis and signature Grobner + bases. Mathicgb is based on the fast data structures from mathic. + ''; + homepage = "https://github.com/Macaulay2/mathicgb"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +}) From 12538cf641469b4993d2d105ca1db1a7f772696d Mon Sep 17 00:00:00 2001 From: coolcuber Date: Wed, 29 Apr 2026 15:35:58 -0400 Subject: [PATCH 8/8] macaulay2: init at 1.26.05 --- pkgs/by-name/ma/macaulay2/package.nix | 272 ++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 pkgs/by-name/ma/macaulay2/package.nix diff --git a/pkgs/by-name/ma/macaulay2/package.nix b/pkgs/by-name/ma/macaulay2/package.nix new file mode 100644 index 000000000000..3c2fc2208478 --- /dev/null +++ b/pkgs/by-name/ma/macaulay2/package.nix @@ -0,0 +1,272 @@ +{ + fetchFromGitHub, + fetchurl, + lib, + makeWrapper, + runCommand, + stdenv, + writableTmpDirAsHomeHook, + + _4ti2, + autoreconfHook, + bison, + blas, + boehmgc, + boost, + cddlib, + cohomcalg, + csdp, + eigen, + emacs-nox, + fflas-ffpack, + flex, + flint, + frobby, + gdbm, + gfortran, + gfan, + givaro, + glpk, + gtest, + icu, + jansson, + libffi, + libxml2, + libz, + lrs, + mathic, + mathicgb, + memtailor, + mpfi, + mpfr, + msolve, + mpsolve, + nauty, + normaliz, + ntl, + onetbb, + openssl, + R, + rWrapper, + pkg-config, + python3, + readline, + singular, + texinfo, + time, + topcom, + which, + xz, + + downloadDocs ? true, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "macaulay2"; + version = "1.26.05"; + + src = fetchFromGitHub { + owner = "Macaulay2"; + repo = "M2"; + tag = "release-${finalAttrs.version}"; + hash = "sha256-UiPLownaFtuYFUlZhBl+Nl/sRZRhG9OUwepZtFTkTqc"; + fetchSubmodules = true; + }; + + docs = fetchurl { + url = "https://macaulay2.com/Downloads/OtherSourceCode/Macaulay2-docs-${finalAttrs.version}.tar.gz"; + hash = "sha256-rz9b7HvxfxI978yM9wE7XvLu7DO38i/amokXBU0RjSg="; + }; + + buildInputs = [ + blas + boehmgc + boost + cddlib + eigen + fflas-ffpack + flint + frobby + gdbm + givaro + glpk + gtest + icu + jansson + libffi + libxml2 + libz + mathic + mathicgb + memtailor + mpfi + mpfr + mpsolve + msolve + nauty + ntl + normaliz + onetbb + openssl + python3 + readline + singular + xz + ]; + + nativeBuildInputs = [ + autoreconfHook + bison + emacs-nox + flex + gdbm + gfortran + makeWrapper + pkg-config + texinfo + which + + # TODO the configure script looks for these in $PATH + _4ti2 + cohomcalg + csdp + gfan + lrs + msolve + nauty + normaliz + topcom + ]; + + __structuredAttrs = true; + + strictDeps = true; + + sourceRoot = "${finalAttrs.src.name}/M2"; + + postPatch = '' + sed -i 's/AC_SUBST(REL,.*uname -r.*)/AC_SUBST(REL,"")/' configure.ac + ''; + + preConfigure = '' + cd BUILD/build + ''; + + configureScript = "../../configure"; + + configureFlags = [ + "--disable-download" + "--enable-shared" + "--with-issue=nixos" + "--with-boost-libdir=${boost}/lib" + "--with-system-libs" + "CPPFLAGS=-I${lib.getDev cddlib}/include/cddlib" + "PYTHON_BIN=${python3.interpreter}" + ]; + + configurePlatforms = [ + "build" + "host" + ]; + + enableParallelBuilding = true; + + preBuild = lib.optionalString downloadDocs '' + ln -s ${finalAttrs.docs} ../tarfiles/${finalAttrs.docs.name} + make -C libraries all-in-Macaulay2-docs + ''; + + buildFlags = lib.optionals downloadDocs [ + "MakeDocumentation=false" + ]; + + postInstall = '' + wrapProgram "$out/bin/M2" \ + --prefix PATH : ${ + lib.makeBinPath [ + _4ti2 + cohomcalg + csdp + gfan + lrs + msolve + nauty + normaliz + openssl + R + topcom + ] + } \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + cddlib + flint + givaro + glpk + mpfi + mpfr + mpsolve + normaliz + ntl + singular + ] + } \ + --prefix R_LIBS_SITE : ${lib.makeSearchPath "library" rWrapper.recommendedPackages} + ''; + + installCheckPhase = '' + runHook preInstallCheck + $out/bin/M2 --check 1 + runHook postInstallCheck + ''; + + doInstallCheck = true; + + passthru.tests = { + core = + runCommand "macaulay2-core-tests" + { + nativeBuildInputs = [ + finalAttrs.finalPackage + writableTmpDirAsHomeHook + ]; + } + '' + M2 --check 2 && touch $out + ''; + + all-packages = + runCommand "macaulay2-all-packages-test" + { + nativeBuildInputs = [ + finalAttrs.finalPackage + writableTmpDirAsHomeHook + ]; + } + '' + M2 --check 3 && touch $out + ''; + }; + + meta = { + description = "System for computing in commutative algebra, algebraic geometry and related fields"; + mainProgram = "M2"; + longDescription = '' + Macaulay2 is a software system devoted to supporting research in + algebraic geometry and commutative algebra, whose creation has been + funded by the National Science Foundation since 1992. + + Macaulay2 includes core algorithms for computing Gröbner bases and graded + or multi-graded free resolutions of modules over quotient rings of graded + or multi-graded polynomial rings with a monomial ordering. The core + algorithms are accessible through a versatile high level interpreted user + language with a powerful debugger supporting the creation of new classes + of mathematical objects and the installation of methods for computing + specifically with them. Macaulay2 can compute Betti numbers, Ext, + cohomology of coherent sheaves on projective varieties, primary + decomposition of ideals, integral closure of rings, and more. + ''; + homepage = "https://macaulay2.com/"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ coolcuber ]; + }; +})