diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:31:50 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:32:25 +0100 |
commit | b7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch) | |
tree | a6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix | |
parent | 710028664e26e85cb831a869b3da9f6993902255 (diff) | |
parent | 0799f514b1cd74878174939df79ac60ca5036673 (diff) | |
download | nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2 nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix | 56 |
1 files changed, 37 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix b/nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix index 8284035c99e1..fa5be39000af 100644 --- a/nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix +++ b/nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix @@ -1,37 +1,54 @@ { lib -, python3 , fetchFromGitHub +, python3 }: + +let + py = python3.override { + packageOverrides = self: super: { + + # Requires 'cyclonedx-python-lib = ">= 2.0.0, < 4.0.0"' + cyclonedx-python-lib = super.cyclonedx-python-lib.overridePythonAttrs (oldAttrs: rec { + version = "3.1.5"; + src = fetchFromGitHub { + owner = "CycloneDX"; + repo = "cyclonedx-python-lib"; + rev = "refs/tags/v${version}"; + hash = "sha256-4lA8OdmvQD94jTeDf+Iz7ZyEQ9fZzCxnXQG9Ir8FKhk="; + }; + }); + }; + }; +in +with py.pkgs; + python3.pkgs.buildPythonApplication rec { pname = "cyclonedx-python"; - version = "0.4.3"; + version = "3.11.7"; + pyproject = true; src = fetchFromGitHub { owner = "CycloneDX"; repo = "cyclonedx-python"; - rev = "v${version}"; - sha256 = "BvG4aWBMsllW2L4lLsiRFUCPjgoDpHxN49fsUFdg7tQ="; + rev = "refs/tags/v${version}"; + sha256 = "sha256-jU/0FkQCyph59TnEE+lckJXsU9whfvWp7dkdfzprYw8="; }; - # They pin versions for exact version numbers because "A bill-of-material such - # as CycloneDX expects exact version numbers" -- but that's unnecessary with - # Nix. - preBuild = '' - sed "s@==.*'@'@" -i setup.py - ''; + nativeBuildInputs = with py.pkgs; [ + poetry-core + pythonRelaxDepsHook + ]; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = with py.pkgs; [ + chardet + cyclonedx-python-lib packageurl-python - requests - xmlschema + pip-requirements-parser setuptools - requirements-parser - packaging - chardet - jsonschema + toml ]; - # the tests want access to the cyclonedx binary + # The tests want access to the cyclonedx binary doCheck = false; pythonImportsCheck = [ @@ -41,8 +58,9 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "Creates CycloneDX Software Bill of Materials (SBOM) from Python projects"; homepage = "https://github.com/CycloneDX/cyclonedx-python"; + changelog = "https://github.com/CycloneDX/cyclonedx-python/releases/tag/v${version}"; license = licenses.asl20; - maintainers = [ ]; + maintainers = with maintainers; [ ]; mainProgram = "cyclonedx-py"; }; } |