Skip to content

Commit 092aa0f

Browse files
committed
feat(pkgs): add mathic, mathicgb and memtailor
- Add package definitions for mathicgb and its dependencies
1 parent 7a157f5 commit 092aa0f

5 files changed

Lines changed: 210 additions & 3 deletions

File tree

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ let
2222
];
2323
packageSets = {
2424
nixpkgs = pkgs;
25+
polypkgs = packages;
2526
};
2627
specialArgs = {
2728
packagesRoot = packagesDir;
@@ -31,6 +32,9 @@ let
3132
packages = {
3233
canon-cups-ufr2 = evalPackage { packagePath = "canon-cups-ufr2"; };
3334
podlet = evalPackage { packagePath = "podlet"; };
35+
mathic = evalPackage { packagePath = "mathic"; };
36+
mathicgb = evalPackage { packagePath = "mathicgb"; };
37+
memtailor = evalPackage { packagePath = "memtailor"; };
3438
inherit (packages.python-modules) rendercv;
3539

3640
python-modules = lib.recurseIntoAttrs {

packages/mathic/default.nix

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
lib,
3+
config,
4+
dream2nix,
5+
...
6+
}:
7+
8+
{
9+
imports = [
10+
dream2nix.modules.dream2nix.mkDerivation
11+
];
12+
13+
config = {
14+
deps =
15+
{ nixpkgs, polypkgs, ... }:
16+
{
17+
inherit (nixpkgs)
18+
fetchFromGitHub
19+
autoreconfHook
20+
pkg-config
21+
;
22+
23+
inherit (polypkgs)
24+
memtailor
25+
;
26+
};
27+
28+
name = "mathic";
29+
version = "0-unstable-2023-09-16";
30+
31+
mkDerivation = {
32+
src = config.deps.fetchFromGitHub {
33+
owner = "Macaulay2";
34+
repo = "mathic";
35+
rev = "07e8df4ded6b586c0ce9eec0f9096690379749cb";
36+
sha256 = "sha256-ZbfD+nn+d/htPVP3QprDua+R1oaPIZsmQln9YGImBto=";
37+
};
38+
39+
nativeBuildInputs = with config.deps; [
40+
autoreconfHook
41+
pkg-config
42+
];
43+
44+
buildInputs = with config.deps; [ memtailor ];
45+
};
46+
47+
public = {
48+
meta = with lib; {
49+
description = "C++ library of symbolic algebra data structures for use in Groebner basis computation";
50+
longDescription = ''
51+
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.
52+
'';
53+
homepage = "https://github.com/Macaulay2/mathic";
54+
license = licensesSpdx."LGPL-2.0-or-later";
55+
maintainers = [ maintainers.polykernel ];
56+
platforms = [
57+
"x86_64-linux"
58+
"aarch64-linux"
59+
];
60+
};
61+
};
62+
};
63+
}

packages/mathicgb/default.nix

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
lib,
3+
config,
4+
dream2nix,
5+
...
6+
}:
7+
8+
{
9+
imports = [
10+
dream2nix.modules.dream2nix.mkDerivation
11+
];
12+
13+
config = {
14+
deps =
15+
{ nixpkgs, polypkgs, ... }:
16+
{
17+
inherit (nixpkgs)
18+
fetchFromGitHub
19+
pkg-config
20+
autoreconfHook
21+
gtest
22+
tbb
23+
;
24+
25+
inherit (polypkgs)
26+
mathic
27+
memtailor
28+
;
29+
};
30+
31+
name = "mathicgb";
32+
version = "0-unstable-2024-02-05";
33+
34+
mkDerivation = {
35+
src = config.deps.fetchFromGitHub {
36+
owner = "Macaulay2";
37+
repo = "mathicgb";
38+
rev = "4cd2bd1357107cf0c83661fdda66c94987de4608";
39+
sha256 = "sha256-eWG4Zq+VynY9eHc8XlNekyFjB0WRl9nv1GudfVDkCyU=";
40+
};
41+
42+
nativeBuildInputs = with config.deps; [
43+
gtest
44+
autoreconfHook
45+
pkg-config
46+
];
47+
48+
buildInputs = with config.deps; [
49+
mathic
50+
memtailor
51+
tbb
52+
];
53+
54+
configureFlags = [
55+
"--with-gtest=yes"
56+
"GTEST_PATH=${config.deps.gtest.src}/googletest"
57+
];
58+
};
59+
60+
public = {
61+
meta = with lib; {
62+
description = "Compute (signature) Groebner bases using the fast datastructures from mathic";
63+
longDescription = ''
64+
Mathicgb is a program for computing Groebner basis and signature Grobner bases. Mathicgb is based on the fast data structures from mathic.
65+
'';
66+
homepage = "https://github.com/Macaulay2/mathicgb";
67+
license = licensesSpdx."GPL-2.0-or-later";
68+
maintainers = [ maintainers.polykernel ];
69+
platforms = [
70+
"x86_64-linux"
71+
"aarch64-linux"
72+
];
73+
};
74+
};
75+
};
76+
}

packages/memtailor/default.nix

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
lib,
3+
config,
4+
dream2nix,
5+
...
6+
}:
7+
8+
{
9+
imports = [
10+
dream2nix.modules.dream2nix.mkDerivation
11+
];
12+
13+
config = {
14+
deps =
15+
{ nixpkgs, ... }:
16+
{
17+
inherit (nixpkgs)
18+
fetchFromGitHub
19+
pkg-config
20+
autoreconfHook
21+
gtest
22+
;
23+
};
24+
25+
name = "memtailor";
26+
version = "0-unstable-2023-09-16";
27+
28+
mkDerivation = {
29+
src = config.deps.fetchFromGitHub {
30+
owner = "Macaulay2";
31+
repo = "memtailor";
32+
rev = "f785005b92a54463dbd5377ab80855a3d2a5f92d";
33+
sha256 = "sha256-fC7I7X97PUmmNG2MCRAw5HB+FoKO6RnMpz8vyRI1Cjk=";
34+
};
35+
36+
nativeBuildInputs = with config.deps; [
37+
gtest
38+
autoreconfHook
39+
pkg-config
40+
];
41+
42+
configureFlags = [
43+
"--with-gtest=yes"
44+
"GTEST_PATH=${config.deps.gtest.src}/googletest"
45+
];
46+
};
47+
48+
public = {
49+
meta = with lib; {
50+
description = "C++ library of special purpose memory allocators";
51+
longDescription = ''
52+
Memtailor is a C++ library of special purpose memory allocators. It currently offers an arena allocator and a memory pool.
53+
'';
54+
homepage = "https://github.com/Macaulay2/memtailor";
55+
license = licensesSpdx."BSD-3-Clause";
56+
maintainers = [ maintainers.polykernel ];
57+
platforms = [
58+
"x86_64-linux"
59+
"aarch64-linux"
60+
];
61+
};
62+
};
63+
};
64+
}

0 commit comments

Comments
 (0)