2017-11-02 09:35:40 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, libgit2, six, cffi }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygit2";
|
2018-07-22 12:17:31 +02:00
|
|
|
version = "0.27.1";
|
2017-11-02 09:35:40 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-07-22 12:17:31 +02:00
|
|
|
sha256 = "1aa5ba1d59370bda158950ba4849bb6e59f13ac7e6fca5e392bfd873bd2c1cf9";
|
2017-11-02 09:35:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = lib.optionalString stdenv.isDarwin ''
|
|
|
|
export DYLD_LIBRARY_PATH="${libgit2}/lib"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ libgit2 six ] ++ lib.optional (!isPyPy) cffi;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# disable tests that require networking
|
|
|
|
rm test/test_repository.py
|
|
|
|
rm test/test_credentials.py
|
|
|
|
rm test/test_submodule.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A set of Python bindings to the libgit2 shared library";
|
|
|
|
homepage = https://pypi.python.org/pypi/pygit2;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|