Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions pkgs/development/python-modules/cachecontrol/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
, buildPythonPackage
, cherrypy
, fetchFromGitHub
, lockfile
, flit-core
, filelock
, mock
, msgpack
, pytestCheckHook
Expand All @@ -13,8 +14,8 @@

buildPythonPackage rec {
pname = "cachecontrol";
version = "0.12.11";
format = "setuptools";
version = "0.13.1";
format = "pyproject";

disabled = pythonOlder "3.6";

Expand All @@ -23,8 +24,8 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "ionrock";
repo = pname;
rev = "v${version}";
hash = "sha256-uUPIQz/n347Q9G7NDOGuB760B/KxOglUxiS/rYjt5Po=";
rev = "refs/tags/v${version}";
hash = "sha256-4N+vk65WxOrT+IJRn+lEnbs5vlWQh9ievVHWWe3BKJ0=";
};

postPatch = ''
Expand All @@ -34,29 +35,39 @@ buildPythonPackage rec {
"urllib3.response.HTTPResponse.from_httplib"
'';

nativeBuildInputs = [
flit-core
];

propagatedBuildInputs = [
msgpack
requests
];

passthru.optional-dependencies = {
filecache = [
filelock
];
redis = [
redis
];
};

nativeCheckInputs = [
cherrypy
mock
pytestCheckHook
] ++ passthru.optional-dependencies.filecache;
requests
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

pythonImportsCheck = [
"cachecontrol"
];

passthru.optional-dependencies = {
filecache = [ lockfile ];
redis = [ redis ];
};

meta = with lib; {
description = "Httplib2 caching for requests";
homepage = "https://github.com/ionrock/cachecontrol";
changelog = "https://github.com/psf/cachecontrol/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ costrouc ];
};
Expand Down
29 changes: 6 additions & 23 deletions pkgs/development/tools/pip-audit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,24 @@
, fetchFromGitHub
, python3
}:
let
py = python3.override {
packageOverrides = self: super: {

cyclonedx-python-lib = super.cyclonedx-python-lib.overridePythonAttrs (oldAttrs: rec {
version = "2.7.1";
src = fetchFromGitHub {
owner = "CycloneDX";
repo = "cyclonedx-python-lib";
rev = "v${version}";
hash = "sha256-c/KhoJOa121/h0n0GUazjUFChnUo05ThD+fuZXc5/Pk=";
};
});
};
};
in
with py.pkgs;

buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "pip-audit";
version = "2.5.6";
version = "2.6.0";
format = "pyproject";

src = fetchFromGitHub {
owner = "trailofbits";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-hpzJtKtvhudT7OzZnuv6LbnMHnHIBYmQsAR1oRglvT0=";
hash = "sha256-Ja3LPKfrqs1evNzjOJ3oxh2vxqw8oZJDIsyZGT0q3PY=";
};

nativeBuildInputs = [
nativeBuildInputs = with python3.pkgs; [
flit-core
];

propagatedBuildInputs = [
propagatedBuildInputs = with python3.pkgs; [
cachecontrol
cyclonedx-python-lib
html5lib
Expand All @@ -47,7 +30,7 @@ buildPythonApplication rec {
toml
] ++ cachecontrol.optional-dependencies.filecache;

nativeCheckInputs = [
nativeCheckInputs = with python3.pkgs; [
pretend
pytestCheckHook
];
Expand Down