diff --git a/pkgs/development/python-modules/osadl-matrix/default.nix b/pkgs/development/python-modules/osadl-matrix/default.nix new file mode 100644 index 000000000000..405fcc7e1e7d --- /dev/null +++ b/pkgs/development/python-modules/osadl-matrix/default.nix @@ -0,0 +1,68 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + + # tests + pytestCheckHook, + requests, +}: + +buildPythonPackage (finalAttrs: { + pname = "osadl-matrix"; + version = "2024.05.23.010555"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "priv-kweihmann"; + repo = "osadl-matrix"; + tag = finalAttrs.version; + hash = "sha256-vcSaWDX8P07Bj035vGq5dZYO+WkZOod7tTubWygl27k="; + }; + + build-system = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + requests + ]; + + # Upstream setup.cfg has addopts, requiring pytest-{cov,forked,random-order}. + # Clearing it is simpler than replicating those plugins, especially since + # they only affect how tests run. + pytestFlags = [ + "--override-ini=addopts=" + ]; + + disabledTests = [ + # earlier in the tests, a full license db is cached and used, but these + # require a different db afterward, but it's not loaded + "test_compats" + "test_supported_licenes_size" + "test_supported_licenses" + + # requires internet access + "test_license" + ]; + + pythonImportsCheck = [ + "osadl_matrix" + ]; + + meta = { + description = "OSADL license compatibility matrix as a CSV"; + homepage = "https://github.com/priv-kweihmann/osadl-matrix"; + license = with lib.licenses; [ + cc-by-40 + unlicense + ]; + maintainers = with lib.maintainers; [ eljamm ]; + teams = with lib.teams; [ ngi ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fec3053e53d8..b6b53dfe39c8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12053,6 +12053,8 @@ self: super: with self; { os-service-types = callPackage ../development/python-modules/os-service-types { }; + osadl-matrix = callPackage ../development/python-modules/osadl-matrix/default.nix { }; + osc = callPackage ../development/python-modules/osc { }; osc-diagram = callPackage ../development/python-modules/osc-diagram { };