mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
Undoes the previous workaround for the new JSON derivation format, which pinned the runtime Nix version to 2.31. As sbomnix no longer supports the legacy derivation format starting with 1.8.0 and the new JSON format is only available starting with Nix 2.33, now the workaround causes sbomnix to fail.
81 lines
1.5 KiB
Nix
81 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
git,
|
|
grype,
|
|
nix,
|
|
nix-visualize,
|
|
python3,
|
|
vulnix,
|
|
}:
|
|
python3.pkgs.buildPythonApplication (finalAttrs: {
|
|
pname = "sbomnix";
|
|
version = "1.8.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tiiuae";
|
|
repo = "sbomnix";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-oMIFcfjbt+lgAcdJbA64opu1qCwUVUIEukotqQEox3Q=";
|
|
|
|
# Remove documentation as it contains references to nix store
|
|
postFetch = ''
|
|
rm -fr "$out"/doc
|
|
find "$out" -name '*.md' ! -name "README.md" -exec rm -f '{}' \;
|
|
'';
|
|
};
|
|
|
|
makeWrapperArgs = [
|
|
"--prefix PATH : ${
|
|
lib.makeBinPath [
|
|
git
|
|
nix
|
|
python3.pkgs.graphviz
|
|
nix-visualize
|
|
vulnix
|
|
grype
|
|
]
|
|
}"
|
|
];
|
|
|
|
build-system = [ python3.pkgs.setuptools ];
|
|
|
|
dependencies = with python3.pkgs; [
|
|
beautifulsoup4
|
|
colorlog
|
|
dfdiskcache
|
|
graphviz
|
|
filelock
|
|
numpy
|
|
packageurl-python
|
|
packaging
|
|
pandas
|
|
pyrate-limiter
|
|
requests
|
|
requests-cache
|
|
requests-ratelimiter
|
|
reuse
|
|
tabulate
|
|
];
|
|
|
|
pythonImportsCheck = [ "sbomnix" ];
|
|
|
|
# Tests require network access
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
description = "Utilities to help with software supply chain challenges on nix targets";
|
|
homepage = "https://github.com/tiiuae/sbomnix";
|
|
license = with lib.licenses; [
|
|
asl20
|
|
bsd3
|
|
cc-by-30
|
|
];
|
|
maintainers = with lib.maintainers; [
|
|
henrirosten
|
|
jk
|
|
];
|
|
mainProgram = "sbomnix";
|
|
};
|
|
})
|