nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 50 lines 1.1 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, pkg-config 6, python3 7, zlib 8, libssh2 9, openssl 10, pcre 11, http-parser 12, libiconv 13, Security 14}: 15 16stdenv.mkDerivation rec { 17 pname = "libgit2"; 18 version = "1.4.3"; 19 # also check the following packages for updates: python3.pkgs.pygit2 and libgit2-glib 20 21 src = fetchFromGitHub { 22 owner = "libgit2"; 23 repo = "libgit2"; 24 rev = "v${version}"; 25 sha256 = "sha256-WnRzH5uMVEStA5ns4GNgMD5YoLQoats9aPLfnz9RoQs="; 26 }; 27 28 cmakeFlags = [ 29 "-DTHREADSAFE=ON" 30 "-DUSE_HTTP_PARSER=system" 31 "-DUSE_SSH=ON" 32 ]; 33 34 nativeBuildInputs = [ cmake python3 pkg-config ]; 35 36 buildInputs = [ zlib libssh2 openssl pcre http-parser ] 37 ++ lib.optional stdenv.isDarwin Security; 38 39 propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv; 40 41 doCheck = false; # hangs. or very expensive? 42 43 meta = with lib; { 44 description = "Linkable library implementation of Git that you can use in your application"; 45 homepage = "https://libgit2.org/"; 46 license = licenses.gpl2Plus; 47 platforms = platforms.all; 48 maintainers = with maintainers; [ SuperSandro2000 ]; 49 }; 50}