at 22.05-pre 972 B view raw
1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, python3 2, zlib, libssh2, openssl, pcre, http-parser 3, libiconv, Security 4}: 5 6stdenv.mkDerivation rec { 7 pname = "libgit2"; 8 version = "1.3.0"; 9 # keep the version in sync with python3.pkgs.pygit2 and libgit2-glib 10 11 src = fetchFromGitHub { 12 owner = "libgit2"; 13 repo = "libgit2"; 14 rev = "v${version}"; 15 sha256 = "sha256-7atNkOBzX+nU1gtFQEaE+EF1L+eex+Ajhq2ocoJY920="; 16 }; 17 18 cmakeFlags = [ 19 "-DTHREADSAFE=ON" 20 "-DUSE_HTTP_PARSER=system" 21 ]; 22 23 nativeBuildInputs = [ cmake python3 pkg-config ]; 24 25 buildInputs = [ zlib libssh2 openssl pcre http-parser ] 26 ++ lib.optional stdenv.isDarwin Security; 27 28 propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv; 29 30 doCheck = false; # hangs. or very expensive? 31 32 meta = { 33 description = "The Git linkable library"; 34 homepage = "https://libgit2.github.com/"; 35 license = lib.licenses.gpl2; 36 platforms = with lib.platforms; all; 37 }; 38}