Files
nixpkgs/pkgs/development/python-modules/certifi/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

54 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
cacert,
pythonOlder,
fetchFromGitHub,
setuptools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "certifi";
version = "2025.07.14";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "certifi";
repo = "python-certifi";
rev = version;
hash = "sha256-TSqBca42i7i59ERTrnPN0fLdLWToYMCq5cfFFsgZm5U=";
};
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 = {
homepage = "https://github.com/certifi/python-certifi";
description = "Python package for providing Mozilla's CA Bundle";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ koral ];
};
}