about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pygit2
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-11-02 16:35:40 +0800
committerOrivej Desh <orivej@gmx.fr>2017-11-05 18:43:30 +0000
commit43934459fa82b99abab5565fac537922aecf08ce (patch)
treefb3868f8631d03ba8d72fe692902047b2cfe70ed /pkgs/development/python-modules/pygit2
parentce1b0c05a52f70fbf03c277018384c9bac3fdf56 (diff)
downloadnixlib-43934459fa82b99abab5565fac537922aecf08ce.tar
nixlib-43934459fa82b99abab5565fac537922aecf08ce.tar.gz
nixlib-43934459fa82b99abab5565fac537922aecf08ce.tar.bz2
nixlib-43934459fa82b99abab5565fac537922aecf08ce.tar.lz
nixlib-43934459fa82b99abab5565fac537922aecf08ce.tar.xz
nixlib-43934459fa82b99abab5565fac537922aecf08ce.tar.zst
nixlib-43934459fa82b99abab5565fac537922aecf08ce.zip
pythonPackages.pygit2: 0.25.1 -> 0.26.0
Diffstat (limited to 'pkgs/development/python-modules/pygit2')
-rw-r--r--pkgs/development/python-modules/pygit2/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix
new file mode 100644
index 000000000000..90bfe9783918
--- /dev/null
+++ b/pkgs/development/python-modules/pygit2/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, libgit2, six, cffi }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "pygit2";
+  version = "0.26.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57";
+  };
+
+  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;
+  };
+}