From d515ded3004597bd82d349977add8f3b2f79b12a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 30 Mar 2024 09:59:23 +0100 Subject: [PATCH 1/2] python312Packages.ijson: refactor --- .../python-modules/ijson/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ijson/default.nix b/pkgs/development/python-modules/ijson/default.nix index dd490f370783..4f99055f5ad1 100644 --- a/pkgs/development/python-modules/ijson/default.nix +++ b/pkgs/development/python-modules/ijson/default.nix @@ -1,26 +1,34 @@ { lib , buildPythonPackage -, fetchPypi -, yajl , cffi +, fetchPypi , pytestCheckHook +, pythonOlder +, setuptools +, yajl }: buildPythonPackage rec { pname = "ijson"; version = "3.2.3"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; hash = "sha256-EClOm/ictxPaBbxHkL3/YWYQQy21YZZIJwdImOF0+Rc="; }; + build-system = [ + setuptools + ]; + buildInputs = [ yajl ]; - propagatedBuildInputs = [ + dependencies = [ cffi ]; @@ -28,8 +36,6 @@ buildPythonPackage rec { pytestCheckHook ]; - doCheck = true; - pythonImportsCheck = [ "ijson" ]; @@ -39,5 +45,6 @@ buildPythonPackage rec { homepage = "https://github.com/ICRAR/ijson"; changelog = "https://github.com/ICRAR/ijson/blob/v${version}/CHANGELOG.md"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } From 446ae7f31e1df1373d928b6dee94aea5b8ef6120 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 30 Mar 2024 10:10:31 +0100 Subject: [PATCH 2/2] vunnel: init at 0.21.1 Tool for collecting vulnerability data from various sources https://github.com/anchore/vunnel --- pkgs/by-name/vu/vunnel/package.nix | 83 ++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 pkgs/by-name/vu/vunnel/package.nix diff --git a/pkgs/by-name/vu/vunnel/package.nix b/pkgs/by-name/vu/vunnel/package.nix new file mode 100644 index 000000000000..6575d5a8d5c4 --- /dev/null +++ b/pkgs/by-name/vu/vunnel/package.nix @@ -0,0 +1,83 @@ +{ lib +, fetchFromGitHub +, git +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "vunnel"; + version = "0.21.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "anchore"; + repo = "vunnel"; + rev = "refs/tags/v${version}"; + hash = "sha256-m+khfAEN+fO3UuCYBqshlvjIXSzebeWBQtoQtPalIio="; + }; + + pythonRelaxDeps = [ + "ijson" + "sqlalchemy" + ]; + + nativeBuildInputs = with python3.pkgs; [ + pythonRelaxDepsHook + ]; + + build-system = with python3.pkgs; [ + poetry-core + poetry-dynamic-versioning + ]; + + dependencies = with python3.pkgs; [ + click + colorlog + cvss + defusedxml + ijson + importlib-metadata + iso8601 + lxml + mashumaro + mergedeep + orjson + pytest-snapshot + python-dateutil + pyyaml + requests + sqlalchemy + xsdata + xxhash + zstandard + ]; + + nativeCheckInputs = [ + git + ] ++ (with python3.pkgs; [ + jsonschema + pytest-mock + pytest-unordered + pytestCheckHook + ]); + + pythonImportsCheck = [ + "vunnel" + ]; + + disabledTests = [ + # Compare output + "test_status" + # TypeError + "test_parser" + ]; + + meta = with lib; { + description = "Tool for collecting vulnerability data from various sources"; + homepage = "https://github.com/anchore/vunnel"; + changelog = "https://github.com/anchore/vunnel/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + mainProgram = "vunnel"; + }; +}