diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 87639fc55d48..d51c11e14914 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2314,6 +2314,12 @@ githubId = 811527; name = "Christopher Jefferson"; }; + chrispattison = { + email = "chpattison@gmail.com"; + github = "ChrisPattison"; + githubId = 641627; + name = "Chris Pattison"; + }; chrispickard = { email = "chrispickard9@gmail.com"; github = "chrispickard"; diff --git a/pkgs/development/python-modules/galois/default.nix b/pkgs/development/python-modules/galois/default.nix new file mode 100644 index 000000000000..b4d66188e312 --- /dev/null +++ b/pkgs/development/python-modules/galois/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, pytestCheckHook +, pytest-xdist +, numpy +, numba +, typing-extensions +}: + +buildPythonPackage rec { + pname = "galois"; + version = "0.0.32"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mhostetter"; + repo = "galois"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-+cxRLrfqk3N9pWKCVsTxruZwMYZ5dQyKJRnrb8y+ECM="; + }; + + propagatedBuildInputs = [ + numpy + numba + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + pytest-xdist + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "numpy >= 1.18.4, < 1.23" "numpy >= 1.18.4" + ''; + + pythonImportsCheck = [ "galois" ]; + + meta = { + description = "A Python 3 package that extends NumPy arrays to operate over finite fields"; + homepage = "https://github.com/mhostetter/galois"; + downloadPage = "https://github.com/mhostetter/galois/releases"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ chrispattison ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 66394cb6e8bd..3f94580e2664 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3459,6 +3459,8 @@ in { pythonPackages = self; }); + galois = callPackage ../development/python-modules/galois { }; + gamble = callPackage ../development/python-modules/gamble { }; gaphas = callPackage ../development/python-modules/gaphas { };