Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 40 lines 1.0 kB view raw
1{ stdenv, fetchFromGitHub, cmake, pkgconfig, python3 2, zlib, libssh2, openssl, pcre, http-parser 3, libiconv, Security 4}: 5 6stdenv.mkDerivation rec { 7 pname = "libgit2"; 8 version = "1.0.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 = "06cwrw93ycpfb5kisnsa5nsy95pm11dbh0vvdjg1jn25h9q5d3vc"; 16 }; 17 18 cmakeFlags = [ 19 "-DTHREADSAFE=ON" 20 "-DUSE_HTTP_PARSER=system" 21 ]; 22 23 nativeBuildInputs = [ cmake python3 pkgconfig ]; 24 25 buildInputs = [ zlib libssh2 openssl pcre http-parser ] 26 ++ stdenv.lib.optional stdenv.isDarwin Security; 27 28 propagatedBuildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv; 29 30 enableParallelBuilding = true; 31 32 doCheck = false; # hangs. or very expensive? 33 34 meta = { 35 description = "The Git linkable library"; 36 homepage = "https://libgit2.github.com/"; 37 license = stdenv.lib.licenses.gpl2; 38 platforms = with stdenv.lib.platforms; all; 39 }; 40}