nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 53 lines 1.4 kB view raw
1{ stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, isPy3k, libgit2, cached-property, pytestCheckHook, cffi, cacert }: 2 3buildPythonPackage rec { 4 pname = "pygit2"; 5 version = "1.9.1"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "sha256-72R5w7YZKCUxawVjNtt36/9ueEmusfu4i3YAGsM3uck="; 10 }; 11 12 preConfigure = lib.optionalString stdenv.isDarwin '' 13 export DYLD_LIBRARY_PATH="${libgit2}/lib" 14 ''; 15 16 buildInputs = [ 17 libgit2 18 ]; 19 20 propagatedBuildInputs = [ 21 cached-property 22 ] ++ lib.optional (!isPyPy) cffi; 23 24 propagatedNativeBuildInputs = lib.optional (!isPyPy) cffi; 25 26 checkInputs = [ pytestCheckHook ]; 27 28 disabledTestPaths = [ 29 # disable tests that require networking 30 "test/test_repository.py" 31 "test/test_credentials.py" 32 "test/test_submodule.py" 33 ]; 34 35 # Tests require certificates 36 # https://github.com/NixOS/nixpkgs/pull/72544#issuecomment-582674047 37 SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; 38 39 # setup.py check is broken 40 # https://github.com/libgit2/pygit2/issues/868 41 dontUseSetuptoolsCheck = true; 42 43 # TODO: Test collection is failing 44 # https://github.com/NixOS/nixpkgs/pull/72544#issuecomment-582681068 45 doCheck = false; 46 47 meta = with lib; { 48 description = "A set of Python bindings to the libgit2 shared library"; 49 homepage = "https://pypi.python.org/pypi/pygit2"; 50 license = licenses.gpl2; 51 maintainers = with maintainers; [ ]; 52 }; 53}