Merge pull request #31119 from peterhoeg/u/lg

libgit2: 0.25.1 -> 0.26.0
This commit is contained in:
Orivej Desh 2017-11-05 18:44:29 +00:00 committed by GitHub
commit d3895ced10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 100 additions and 134 deletions

View File

@ -1,10 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: {
name = "gitg-3.24.0";
name = "gitg-3.26.0";
src = fetchurl {
url = mirror://gnome/sources/gitg/3.24/gitg-3.24.0.tar.xz;
sha256 = "3e4ec4a8ae83bc7ced8c7610927ade70e37daa5e8beeb4f357a6ea30b4cc951e";
url = mirror://gnome/sources/gitg/3.26/gitg-3.26.0.tar.xz;
sha256 = "26730d437d6a30d6e341b9e8da99d2134dce4b96022c195609f45062f82b54d5";
};
}

View File

@ -1,12 +1,14 @@
{ stdenv, fetchurl, gnome3, libtool, pkgconfig, vala_0_32, libssh2
{ stdenv, fetchurl, gnome3, libtool, pkgconfig, vala, libssh2
, gtk_doc, gobjectIntrospection, libgit2, glib }:
stdenv.mkDerivation rec {
inherit (import ./src.nix fetchurl) name src;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gnome3.gnome_common libtool vala_0_32 libssh2
gtk_doc gobjectIntrospection libgit2 glib ];
nativeBuildInputs = [
gnome3.gnome_common libtool pkgconfig vala gtk_doc gobjectIntrospection
];
buildInputs = [ libssh2 libgit2 glib ];
meta = with stdenv.lib; {
platforms = platforms.linux;

View File

@ -1,12 +1,10 @@
# Autogenerated by maintainers/scripts/gnome.sh update
fetchurl: rec {
major = "0.25";
minor = "0";
name = "libgit2-glib-${major}.${minor}";
fetchurl: {
name = "libgit2-glib-0.26.0";
src = fetchurl {
url = "mirror://gnome/sources/libgit2-glib/${major}/${name}.tar.xz";
sha256 = "0rf5gcr3khp35wj9ax9cbyq5j3iiwa1l0fi16w6sfgmrryd6n9aa";
url = mirror://gnome/sources/libgit2-glib/0.26/libgit2-glib-0.26.0.tar.xz;
sha256 = "06b16cfcc3a53d9804858618d690e5509e9af2e2245b75f0479cadbbe39745c3";
};
}

View File

@ -0,0 +1,33 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, python
, zlib, libssh2, openssl, http-parser, curl, libiconv
}:
stdenv.mkDerivation (rec {
version = "0.25.1";
name = "libgit2-${version}";
src = fetchFromGitHub {
owner = "libgit2";
repo = "libgit2";
rev = "v${version}";
sha256 = "1jhikg0gqpdzfzhgv44ybdpm24lvgkc7ki4306lc5lvmj1s2nylj";
};
cmakeFlags = "-DTHREADSAFE=ON";
nativeBuildInputs = [ cmake python pkgconfig ];
buildInputs = [ zlib libssh2 openssl http-parser curl ];
enableParallelBuilding = true;
meta = {
description = "The Git linkable library";
homepage = https://libgit2.github.com/;
license = stdenv.lib.licenses.gpl2;
platforms = with stdenv.lib.platforms; all;
};
} // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
NIX_LDFLAGS = "-liconv";
propagatedBuildInputs = [ libiconv ];
})

View File

@ -1,35 +1,30 @@
{ stdenv, fetchurl, pkgconfig, cmake, zlib, python, libssh2, openssl, curl, http-parser, libiconv }:
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, python, libssh2, openssl, curl, http-parser, libiconv }:
stdenv.mkDerivation (rec {
version = "0.25.1";
name = "libgit2-${version}";
version = "0.26.0";
# keep the version in sync with pythonPackages.pygit2 and gnome3.libgit2-glib
src = fetchurl {
name = "${name}.tar.gz";
url = "https://github.com/libgit2/libgit2/tarball/v${version}";
sha256 = "100bah8picqjzyhpw4wd7z5vyidcb8aggin50bhbpn607h8n8bml";
src = fetchFromGitHub {
owner = "libgit2";
repo = "libgit2";
rev = "v${version}";
sha256 = "0zrrmfkfhd2xb4879z5khjb6xsdklrm01f1lscrs2ks68v25fk78";
};
# TODO: `cargo` (rust's package manager) surfaced a serious bug in
# libgit2 when the `Security.framework` transport is used on Darwin.
# The upstream issue is tracked at
# https://github.com/libgit2/libgit2/issues/3885 - feel free to
# remove this patch as soon as it's resolved (i.E. when cargo is
# working fine without this patch)
patches = stdenv.lib.optionals stdenv.isDarwin [
./disable-security.framework.patch
];
cmakeFlags = "-DTHREADSAFE=ON";
nativeBuildInputs = [ cmake python pkgconfig ];
buildInputs = [ zlib libssh2 openssl http-parser curl ];
meta = {
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "The Git linkable library";
homepage = https://libgit2.github.com/;
license = stdenv.lib.licenses.gpl2;
platforms = with stdenv.lib.platforms; all;
license = licenses.gpl2;
platforms = with platforms; all;
};
} // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
NIX_LDFLAGS = "-liconv";

View File

@ -1,58 +0,0 @@
From fbc2ea65406236a740b8734dd41dc5ddbc24f8c9 Mon Sep 17 00:00:00 2001
From: mulrich <mulrich@entwicklerheld.local>
Date: Mon, 8 Aug 2016 15:36:07 +0200
Subject: [PATCH] disable security.framework
---
CMakeLists.txt | 7 +++----
src/curl_stream.c | 9 ++++++++-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 93a9e47..331e148 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,7 +49,8 @@ ENDIF()
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET( USE_ICONV ON )
- FIND_PACKAGE(Security)
+ # FIND_PACKAGE(Security)
+ SET(SECURITY_FOUND "NO")
FIND_PACKAGE(CoreFoundation REQUIRED)
ENDIF()
@@ -87,9 +88,7 @@ IF(MSVC)
OPTION(MSVC_CRTDBG "Enable CRTDBG memory leak reporting" OFF)
ENDIF()
-IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- OPTION( USE_OPENSSL "Link with and use openssl library" ON )
-ENDIF()
+OPTION( USE_OPENSSL "Link with and use openssl library" ON )
CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtim "sys/types.h;sys/stat.h"
HAVE_STRUCT_STAT_ST_MTIM LANGUAGE C)
diff --git a/src/curl_stream.c b/src/curl_stream.c
index 98de187..a8a9f4c 100644
--- a/src/curl_stream.c
+++ b/src/curl_stream.c
@@ -309,7 +309,14 @@ int git_curl_stream_new(git_stream **out, const char *host, const char *port)
curl_easy_setopt(handle, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_easy_setopt(handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
- /* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); */
+ const char* cainfo = getenv("SSL_CERT_FILE");
+ if(cainfo != NULL) {
+ curl_easy_setopt(handle, CURLOPT_CAINFO, cainfo);
+ }
+
+ /*
+ curl_easy_setopt(handle, CURLOPT_VERBOSE, 1);
+ */
st->parent.version = GIT_STREAM_VERSION;
st->parent.encrypted = 0; /* we don't encrypt ourselves */
--
2.3.8 (Apple Git-58)

View File

@ -0,0 +1,31 @@
{ stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, libgit2, six, cffi }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "pygit2";
version = "0.26.0";
src = fetchPypi {
inherit pname version;
sha256 = "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57";
};
preConfigure = lib.optionalString stdenv.isDarwin ''
export DYLD_LIBRARY_PATH="${libgit2}/lib"
'';
propagatedBuildInputs = [ libgit2 six ] ++ lib.optional (!isPyPy) cffi;
preCheck = ''
# disable tests that require networking
rm test/test_repository.py
rm test/test_credentials.py
rm test/test_submodule.py
'';
meta = with lib; {
description = "A set of Python bindings to the libgit2 shared library";
homepage = https://pypi.python.org/pypi/pygit2;
license = licenses.gpl2;
};
}

View File

@ -17,7 +17,7 @@ buildRustPackage rec {
cargoDepsHook = ''
(
cd ${name}-src
cd */
# see https://github.com/git-series/git-series/pull/56
patch -p1 < ${fetchpatch {
url = "https://github.com/Mic92/git-series/commit/3aa30a47d74ebf90b444dccdf8c153f07f119483.patch";

View File

@ -6011,6 +6011,7 @@ with pkgs;
julia_05 = callPackage ../development/compilers/julia/0.5.nix {
gmp = gmp6;
libgit2 = libgit2_0_25;
openblas = openblasCompat;
inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices;
llvm = llvm_38;
@ -8293,11 +8294,13 @@ with pkgs;
icon-lang = callPackage ../development/interpreters/icon-lang { };
libgit2 = callPackage ../development/libraries/git2 (
stdenv.lib.optionalAttrs stdenv.isDarwin {
inherit (rec {
arg = stdenv.lib.optionalAttrs stdenv.isDarwin {
inherit (darwin) libiconv;
}
);
};
libgit2 = callPackage ../development/libraries/git2 arg;
libgit2_0_25 = callPackage ../development/libraries/git2/0.25.nix arg;
}) libgit2 libgit2_0_25;
gle = callPackage ../development/libraries/gle { };

View File

@ -15674,45 +15674,7 @@ in {
};
};
pygit2 = buildPythonPackage rec {
name = "pygit2-0.25.1";
src = pkgs.fetchurl {
url = "mirror://pypi/p/pygit2/${name}.tar.gz";
sha256 = "0sja3g9mqwp5bnhdc313b2gc4z3p70nn6zzf2h8j581g0lrn0sg8";
};
# Fixes a bug which can cause test failed when cffi==1.10
prePatch = let
cffiVersionPatch = pkgs.fetchurl {
url = "https://github.com/libgit2/pygit2/commit/b88dc868423af2f760f649960112efd0e37e5335.patch";
sha256 = "14cfrz56y2dnwlxrrss9pjhxfnyyg5856gbabzjzyx674k0qcid4";
};
in ''
# we need to delete part of the patch because the missing .travis.yml causes problem
sed -e '1,36d' ${cffiVersionPatch} | patch -p1
'';
preConfigure = ( if stdenv.isDarwin then ''
export DYLD_LIBRARY_PATH="${pkgs.libgit2}/lib"
'' else "" );
propagatedBuildInputs = with self; [ pkgs.libgit2 six ] ++ optionals (!isPyPy) [ cffi ];
preCheck = ''
# disable tests that require networking
rm test/test_repository.py
rm test/test_credentials.py
rm test/test_submodule.py
'';
meta = {
homepage = https://pypi.python.org/pypi/pygit2;
description = "A set of Python bindings to the libgit2 shared library";
license = licenses.gpl2;
platforms = platforms.all;
};
};
pygit2 = callPackage ../development/python-modules/pygit2 { };
Babel = buildPythonPackage (rec {
name = "Babel-2.3.4";