2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cacert,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "certifi";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2024.07.04";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = "python-certifi";
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-ArJB19tPpwTT1LjYo8OF1+Mo//l8FaMHTpvSvlfve3Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
patches = [
|
|
|
|
# Add support for NIX_SSL_CERT_FILE
|
|
|
|
./env.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Use our system-wide ca-bundle instead of the bundled one
|
|
|
|
rm -v "certifi/cacert.pem"
|
|
|
|
ln -snvf "${cacert}/etc/ssl/certs/ca-bundle.crt" "certifi/cacert.pem"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
propagatedNativeBuildInputs = [
|
|
|
|
# propagate cacerts setup-hook to set up `NIX_SSL_CERT_FILE`
|
|
|
|
cacert
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "certifi" ];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
2021-12-30 13:39:12 +00:00
|
|
|
homepage = "https://github.com/certifi/python-certifi";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python package for providing Mozilla's CA Bundle";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.isc;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ koral ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|