2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
let
|
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
packaging = super.packaging.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "21.3";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-3UfEKSfYmrkR5gZRiQfMLTofOLvQJjhZcGQ/nFuOz+s=";
|
|
|
|
};
|
|
|
|
nativeBuildInputs = with python3.pkgs; [ setuptools ];
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [ pyparsing six ];
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with py.pkgs;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "skjold";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.6.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twu";
|
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-rsdstzNZvokYfTjEyPrWR+0SJpf9wL0HAesq8+A+tPY=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = with py.pkgs; [
|
2022-02-10 20:34:41 +00:00
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
2022-02-10 20:34:41 +00:00
|
|
|
click
|
|
|
|
packaging
|
|
|
|
pyyaml
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = with py.pkgs; [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytest-mock
|
|
|
|
pytest-watch
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Too sensitive to pass
|
|
|
|
"tests/test_cli.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Requires network access
|
|
|
|
"pyup-werkzeug"
|
|
|
|
"test_ensure_accessing_advisories_triggers_update"
|
|
|
|
"test_ensure_accessing_advisories_triggers_update"
|
|
|
|
"test_ensure_gemnasium_update"
|
|
|
|
"test_ensure_missing_github_token_raises_usage_error"
|
|
|
|
"test_ensure_pypi_advisory_db_update"
|
|
|
|
"test_ensure_source_is_affected_single"
|
|
|
|
"test_osv_advisory_with_vulnerable_package_via_osv_api"
|
|
|
|
"urllib3"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"skjold"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool to Python dependencies against security advisory databases";
|
|
|
|
homepage = "https://github.com/twu/skjold";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/twu/skjold/releases/tag/v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|