2017-11-02 08:35:40 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, libgit2, six, cffi }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygit2";
|
2018-05-09 14:49:51 +00:00
|
|
|
version = "0.26.4";
|
2017-11-02 08:35:40 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-05-09 14:49:51 +00:00
|
|
|
sha256 = "a8a0ecce4aadac2675afa5bcda0f698bfe39ec61ac1e15b9264704d1b41bb390";
|
2017-11-02 08:35:40 +00: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;
|
|
|
|
};
|
|
|
|
}
|