about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libgit2
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-02-22 10:43:06 +0000
committerAlyssa Ross <hi@alyssa.is>2022-03-11 16:17:56 +0000
commitca1aada113c0ebda1ab8667199f6453f8e01c4fc (patch)
tree55e402280096f62eb0bc8bcad5ce6050c5a0aec7 /nixpkgs/pkgs/development/libraries/libgit2
parente4df5a52a6a6531f32626f57205356a773ac2975 (diff)
parent93883402a445ad467320925a0a5dbe43a949f25b (diff)
downloadnixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.gz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.bz2
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.lz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.xz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.zst
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.zip
Merge commit '93883402a445ad467320925a0a5dbe43a949f25b'
Conflicts:
	nixpkgs/nixos/modules/programs/ssh.nix
	nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix
	nixpkgs/pkgs/data/fonts/noto-fonts/default.nix
	nixpkgs/pkgs/development/go-modules/generic/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/default.nix
	nixpkgs/pkgs/development/libraries/mesa/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libgit2')
-rw-r--r--nixpkgs/pkgs/development/libraries/libgit2/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libgit2/default.nix b/nixpkgs/pkgs/development/libraries/libgit2/default.nix
new file mode 100644
index 000000000000..dc12e643cb75
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgit2/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, python3
+, zlib
+, libssh2
+, openssl
+, pcre
+, http-parser
+, libiconv
+, Security
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgit2";
+  version = "1.4.0";
+  # also check the following packages for updates: python3.pkgs.pygit2 and libgit2-glib
+
+  src = fetchFromGitHub {
+    owner = "libgit2";
+    repo = "libgit2";
+    rev = "v${version}";
+    sha256 = "sha256-21t7fD/5O+HIHUDEv8MqloDmAIm9sSpJYqreCD3Co2k=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/libgit2/libgit2/commit/8bc9eda779b2e2602fc74944aba5d39198e0642f.patch";
+      sha256 = "sha256-r2i4+WsrxIpSwH0g/AikBdAajBncXb1zz0uOQB0h1Jk=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DTHREADSAFE=ON"
+    "-DUSE_HTTP_PARSER=system"
+    "-DUSE_SSH=ON"
+  ];
+
+  nativeBuildInputs = [ cmake python3 pkg-config ];
+
+  buildInputs = [ zlib libssh2 openssl pcre http-parser ]
+    ++ lib.optional stdenv.isDarwin Security;
+
+  propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv;
+
+  doCheck = false; # hangs. or very expensive?
+
+  meta = {
+    description = "Linkable library implementation of Git that you can use in your application";
+    homepage = "https://libgit2.org/";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ ];
+  };
+}