at 18.03-beta 1.0 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.0"; 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 = "0zrrmfkfhd2xb4879z5khjb6xsdklrm01f1lscrs2ks68v25fk78"; 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 meta = with stdenv.lib; { 30 description = "The Git linkable library"; 31 homepage = https://libgit2.github.com/; 32 license = licenses.gpl2; 33 platforms = with platforms; all; 34 }; 35} // stdenv.lib.optionalAttrs (!stdenv.isLinux) { 36})