1{ stdenv, fetchFromGitHub, cmake, pkgconfig, python
2, zlib, libssh2, openssl, http-parser, curl
3, libiconv, Security
4}:
5
6stdenv.mkDerivation rec {
7 version = "0.27.8";
8 name = "libgit2-${version}";
9
10 src = fetchFromGitHub {
11 owner = "libgit2";
12 repo = "libgit2";
13 rev = "v${version}";
14 sha256 = "0wzx8nkyy9m7mx6cks58chjd4289vjsw97mxm9w6f1ggqsfnmbr9";
15 };
16
17 cmakeFlags = [ "-DTHREADSAFE=ON" ];
18
19 nativeBuildInputs = [ cmake python pkgconfig ];
20
21 buildInputs = [ zlib libssh2 openssl http-parser curl ]
22 ++ stdenv.lib.optional stdenv.isDarwin Security;
23
24 propagatedBuildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv;
25
26 enableParallelBuilding = true;
27
28 doCheck = false; # hangs. or very expensive?
29
30 meta = {
31 description = "The Git linkable library";
32 homepage = https://libgit2.github.com/;
33 license = stdenv.lib.licenses.gpl2;
34 platforms = with stdenv.lib.platforms; all;
35 };
36}