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