15 buildPythonPackage rec {
18 format = "setuptools";
20 disabled = pythonOlder "3.7";
23 inherit pname version;
24 hash = "sha256-bd43Q2+rFCZK09bLxarj/VVeualoCnv91uVkzXe14rg=";
27 preConfigure = lib.optionalString stdenv.isDarwin ''
28 export DYLD_LIBRARY_PATH="${libgit2}/lib"
35 propagatedBuildInputs = [
38 ] ++ lib.optionals (!isPyPy) [
42 propagatedNativeBuildInputs = lib.optionals (!isPyPy) [
51 # Disable tests that require networking
52 "test/test_repository.py"
53 "test/test_credentials.py"
54 "test/test_submodule.py"
57 # Tests require certificates
58 # https://github.com/NixOS/nixpkgs/pull/72544#issuecomment-582674047
59 SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
61 pythonImportsCheck = [
66 description = "A set of Python bindings to the libgit2 shared library";
67 homepage = "https://github.com/libgit2/pygit2";
68 license = licenses.gpl2Only;
69 maintainers = with maintainers; [ ];