nixos-configs/packages/urllib3/default.nix
matt1432 06669e8679
All checks were successful
Discord / discord commits (push) Has been skipped
fix(hass): override urllib for spotifyplus
2024-09-30 21:45:18 -04:00

67 lines
1.3 KiB
Nix

# From nixpkgs 4c0061c983a2bcb888f5c478cfb7631ec1090c22
{
lib,
fetchPypi,
python3Packages,
}:
python3Packages.buildPythonPackage rec {
pname = "urllib3";
version = "1.26.16";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-jxNfZQJ1a95rKpsomJ31++h8mXDOyqaQQe3M5/BYmxQ=";
};
propagatedBuildInputs =
passthru.optional-dependencies.brotli
++ passthru.optional-dependencies.socks;
nativeCheckInputs = with python3Packages; [
python-dateutil
mock
pytest-freezegun
pytest-timeout
pytestCheckHook
tornado
trustme
];
doCheck = false;
preCheck = ''
export CI # Increases LONG_TIMEOUT
'';
pythonImportsCheck = [
"urllib3"
];
passthru.optional-dependencies = with python3Packages; {
brotli =
if isPyPy
then [
brotlicffi
]
else [
brotli
];
secure = [
certifi
cryptography
idna
pyopenssl
];
socks = [
pysocks
];
};
meta = with lib; {
description = "Powerful, sanity-friendly HTTP client for Python";
homepage = "https://github.com/shazow/urllib3";
changelog = "https://github.com/urllib3/urllib3/blob/${version}/CHANGES.rst";
license = licenses.mit;
};
}