diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2024-05-03 09:19:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 09:19:02 +0200 |
commit | b967e17e0cc8d9a6613eb10d364d9e83135f71fb (patch) | |
tree | 0aee554e74185c408fad92d8700d6cbcd1a33988 /pkgs | |
parent | ac08ca33c538d35132c4596fb442aeb9d7e21c0d (diff) | |
parent | 33369e894c0f762972627aa7af78046d2b7edcfb (diff) |
Merge pull request #308517 from fabaff/mitreattack-python
python312Packages.pwkit: init at 1.2.0, python312Packages.drawsvg: init at 2.3.0
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/drawsvg/default.nix | 61 | ||||
-rw-r--r-- | pkgs/development/python-modules/pwkit/default.nix | 40 | ||||
-rw-r--r-- | pkgs/development/python-modules/stix2-patterns/default.nix | 35 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 4 |
4 files changed, 119 insertions, 21 deletions
diff --git a/pkgs/development/python-modules/drawsvg/default.nix b/pkgs/development/python-modules/drawsvg/default.nix new file mode 100644 index 0000000000000..84fd89373ffcd --- /dev/null +++ b/pkgs/development/python-modules/drawsvg/default.nix @@ -0,0 +1,61 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + pythonOlder, + numpy, + imageio, + cairosvg, + imageio-ffmpeg, + pwkit, +}: + +buildPythonPackage rec { + pname = "drawsvg"; + version = "2.3.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "cduck"; + repo = "drawsvg"; + rev = "refs/tags/${version}"; + hash = "sha256-LoA5yYeHO4GqS3dk7EMg1ZC42HBgmM6rSfigWMc4yUQ="; + }; + + build-system = [ setuptools ]; + + passthru.optional-dependencies = { + all = [ + numpy + imageio + cairosvg + imageio-ffmpeg + pwkit + ]; + raster = [ + numpy + imageio + cairosvg + imageio-ffmpeg + ]; + color = [ + pwkit + numpy + ]; + }; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ "drawsvg" ]; + + meta = with lib; { + description = "Programmatically generate SVG (vector) images, animations, and interactive Jupyter widgets"; + homepage = "https://github.com/cduck/drawsvg"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pwkit/default.nix b/pkgs/development/python-modules/pwkit/default.nix new file mode 100644 index 0000000000000..f1fe2ad54556e --- /dev/null +++ b/pkgs/development/python-modules/pwkit/default.nix @@ -0,0 +1,40 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + numpy, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "pwkit"; + version = "1.2.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "pkgw"; + repo = "pwkit"; + rev = "refs/tags/pwkit@${version}"; + hash = "sha256-bQno1SIbxAJ1TL068eshfFgAkRXFmbGu2GTbv1BRGU0="; + }; + + build-system = [ setuptools ]; + + dependencies = [ numpy ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ "pwkit" ]; + + meta = with lib; { + description = "Miscellaneous science/astronomy tools"; + homepage = "https://github.com/pkgw/pwkit/"; + changelog = "https://github.com/pkgw/pwkit/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/stix2-patterns/default.nix b/pkgs/development/python-modules/stix2-patterns/default.nix index b291e2cd72427..4ca5ee040a75e 100644 --- a/pkgs/development/python-modules/stix2-patterns/default.nix +++ b/pkgs/development/python-modules/stix2-patterns/default.nix @@ -1,12 +1,12 @@ -{ lib -, antlr4-python3-runtime -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, setuptools -, pytestCheckHook -, wheel -, six +{ + lib, + antlr4-python3-runtime, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + setuptools, + six, }: buildPythonPackage rec { @@ -25,26 +25,19 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "antlr4-python3-runtime~=" "antlr4-python3-runtime>=" + --replace-fail "antlr4-python3-runtime~=" "antlr4-python3-runtime>=" ''; - nativeBuildInputs = [ - setuptools - wheel - ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ antlr4-python3-runtime six ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ - "stix2patterns" - ]; + pythonImportsCheck = [ "stix2patterns" ]; disabledTestPaths = [ # Exception: Could not deserialize ATN with version (expected 4) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 754a18310412c..61b6f96482c61 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3530,6 +3530,8 @@ self: super: with self; { drawilleplot = callPackage ../development/python-modules/drawilleplot { }; + drawsvg = callPackage ../development/python-modules/drawsvg { }; + dremel3dpy = callPackage ../development/python-modules/dremel3dpy { }; drf-jwt = callPackage ../development/python-modules/drf-jwt { }; @@ -10471,6 +10473,8 @@ self: super: with self; { pweave = callPackage ../development/python-modules/pweave { }; + pwkit = callPackage ../development/python-modules/pwkit { }; + pwlf = callPackage ../development/python-modules/pwlf { }; pwndbg = callPackage ../development/python-modules/pwndbg { }; |