diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-28 14:39:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-10 08:52:36 +0000 |
commit | 693e64ef7421374338ddb1dc12b9573feec75972 (patch) | |
tree | 2526ac075d248699c35d63e04499890ee4381f5f /nixpkgs/pkgs/tools/misc/cyclonedx-python | |
parent | 7014df2256694d97093d6f2bb1db340d346dea88 (diff) | |
parent | 8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17 (diff) | |
download | nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.gz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.bz2 nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.lz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.xz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.zst nixlib-693e64ef7421374338ddb1dc12b9573feec75972.zip |
Merge commit '8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/cyclonedx-python')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix b/nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix new file mode 100644 index 000000000000..97dfd8310da5 --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/cyclonedx-python/default.nix @@ -0,0 +1,47 @@ +{ lib +, python3 +, fetchFromGitHub +}: +python3.pkgs.buildPythonApplication rec { + pname = "cyclonedx-python"; + version = "0.4.3"; + + src = fetchFromGitHub { + owner = "CycloneDX"; + repo = "cyclonedx-python"; + rev = "v${version}"; + sha256 = "BvG4aWBMsllW2L4lLsiRFUCPjgoDpHxN49fsUFdg7tQ="; + }; + + # 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 + ''; + + propagatedBuildInputs = with python3.pkgs; [ + packageurl-python + requests + xmlschema + setuptools + requirements-parser + packaging + chardet + jsonschema + ]; + + # the tests want access to the cyclonedx binary + doCheck = false; + + pythonImportsCheck = [ + "cyclonedx" + ]; + + meta = with lib; { + description = "Creates CycloneDX Software Bill of Materials (SBOM) from Python projects"; + homepage = "https://github.com/CycloneDX/cyclonedx-python"; + license = licenses.asl20; + maintainers = teams.determinatesystems.members; + }; +} |