h0nIg 8acf8df82d
python313Packages.certifi: 2025.4.26 -> 2025.6.15 (#420216)
* python312Packages.certifi: 2025.4.26 -> 2025.6.15

* python312Packages.certifi: upstream minimum

* Update pkgs/development/python-modules/certifi/default.nix

---------

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2025-07-07 01:08:04 +02:00

54 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
cacert,
pythonOlder,
fetchFromGitHub,
setuptools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "certifi";
version = "2025.06.15";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "certifi";
repo = "python-certifi";
rev = version;
hash = "sha256-ah2a+Qspll3jZ8M7CRL7zhTIt2kuRIiWeI6vTgwb3vs=";
};
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"
'';
nativeBuildInputs = [ setuptools ];
propagatedNativeBuildInputs = [
# propagate cacerts setup-hook to set up `NIX_SSL_CERT_FILE`
cacert
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "certifi" ];
meta = with lib; {
homepage = "https://github.com/certifi/python-certifi";
description = "Python package for providing Mozilla's CA Bundle";
license = licenses.isc;
maintainers = with maintainers; [ koral ];
};
}