From 1aef6f40bbbe3348986058a12898e57afd4c0ba6 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 14 Sep 2017 14:58:37 +0200 Subject: [PATCH 1/8] libgit2: fix hash ... and switch to fetchFromGitHub to avoid future hash changes. --- pkgs/development/libraries/git2/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/git2/default.nix b/pkgs/development/libraries/git2/default.nix index 0d53d00737b..ecc6552d1b4 100644 --- a/pkgs/development/libraries/git2/default.nix +++ b/pkgs/development/libraries/git2/default.nix @@ -1,13 +1,16 @@ -{ stdenv, fetchurl, pkgconfig, cmake, zlib, python, libssh2, openssl, curl, http-parser, libiconv }: +{ stdenv, fetchFromGitHub, cmake, pkgconfig, python +, zlib, libssh2, openssl, http-parser, curl, libiconv +}: stdenv.mkDerivation (rec { version = "0.25.1"; name = "libgit2-${version}"; - 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 = "1jhikg0gqpdzfzhgv44ybdpm24lvgkc7ki4306lc5lvmj1s2nylj"; }; # TODO: `cargo` (rust's package manager) surfaced a serious bug in @@ -23,8 +26,11 @@ stdenv.mkDerivation (rec { 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/; From ce1b0c05a52f70fbf03c277018384c9bac3fdf56 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 5 Nov 2017 05:03:17 +0000 Subject: [PATCH 2/8] libgit2: 0.25.1 -> 0.26.0 --- pkgs/development/libraries/git2/0.25.nix | 43 +++++++++++++++++++++ pkgs/development/libraries/git2/default.nix | 25 ++++-------- pkgs/top-level/all-packages.nix | 10 +++-- 3 files changed, 56 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/libraries/git2/0.25.nix diff --git a/pkgs/development/libraries/git2/0.25.nix b/pkgs/development/libraries/git2/0.25.nix new file mode 100644 index 00000000000..ecc6552d1b4 --- /dev/null +++ b/pkgs/development/libraries/git2/0.25.nix @@ -0,0 +1,43 @@ +{ 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"; + }; + + # 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 ]; + + 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 ]; +}) diff --git a/pkgs/development/libraries/git2/default.nix b/pkgs/development/libraries/git2/default.nix index ecc6552d1b4..42cf181f84f 100644 --- a/pkgs/development/libraries/git2/default.nix +++ b/pkgs/development/libraries/git2/default.nix @@ -1,28 +1,17 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, python -, zlib, libssh2, openssl, http-parser, curl, 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 = fetchFromGitHub { owner = "libgit2"; repo = "libgit2"; rev = "v${version}"; - sha256 = "1jhikg0gqpdzfzhgv44ybdpm24lvgkc7ki4306lc5lvmj1s2nylj"; + 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 ]; @@ -31,11 +20,11 @@ stdenv.mkDerivation (rec { enableParallelBuilding = true; - meta = { + 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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e87a3f73472..b02213de79d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8293,11 +8293,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 { }; From 43934459fa82b99abab5565fac537922aecf08ce Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 2 Nov 2017 16:35:40 +0800 Subject: [PATCH 3/8] pythonPackages.pygit2: 0.25.1 -> 0.26.0 --- .../python-modules/pygit2/default.nix | 31 ++++++++++++++ pkgs/top-level/python-packages.nix | 40 +------------------ 2 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 pkgs/development/python-modules/pygit2/default.nix diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix new file mode 100644 index 00000000000..90bfe978391 --- /dev/null +++ b/pkgs/development/python-modules/pygit2/default.nix @@ -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; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e4600cf162a..98470de6b52 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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"; From 711f260f71a4b54f28296fc89a2e0c854b72eff2 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Fri, 3 Nov 2017 03:30:31 +0000 Subject: [PATCH 4/8] libgit2-glib: 0.25.0 -> 0.26.0 --- pkgs/desktops/gnome-3/misc/libgit2-glib/default.nix | 10 ++++++---- pkgs/desktops/gnome-3/misc/libgit2-glib/src.nix | 10 ++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/desktops/gnome-3/misc/libgit2-glib/default.nix b/pkgs/desktops/gnome-3/misc/libgit2-glib/default.nix index a71dbf5494d..36feb09d7ee 100644 --- a/pkgs/desktops/gnome-3/misc/libgit2-glib/default.nix +++ b/pkgs/desktops/gnome-3/misc/libgit2-glib/default.nix @@ -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; diff --git a/pkgs/desktops/gnome-3/misc/libgit2-glib/src.nix b/pkgs/desktops/gnome-3/misc/libgit2-glib/src.nix index b9abde42cbd..00e747500c6 100644 --- a/pkgs/desktops/gnome-3/misc/libgit2-glib/src.nix +++ b/pkgs/desktops/gnome-3/misc/libgit2-glib/src.nix @@ -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"; }; } From 2b9975c2440c1f6250a7b41194f8b72c66270458 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Fri, 3 Nov 2017 03:51:01 +0000 Subject: [PATCH 5/8] gitg: 3.24.0 -> 3.26.0 --- pkgs/desktops/gnome-3/misc/gitg/src.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/desktops/gnome-3/misc/gitg/src.nix b/pkgs/desktops/gnome-3/misc/gitg/src.nix index 9c6dd2148cc..c72e2830ad1 100644 --- a/pkgs/desktops/gnome-3/misc/gitg/src.nix +++ b/pkgs/desktops/gnome-3/misc/gitg/src.nix @@ -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"; }; } From 2fb0edd085ea83a66e88de209806be720fb53244 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Fri, 3 Nov 2017 04:49:55 +0000 Subject: [PATCH 6/8] git-series: fix build after "source" name change --- pkgs/development/tools/git-series/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/git-series/default.nix b/pkgs/development/tools/git-series/default.nix index 44120ad023a..7d94863ea1c 100644 --- a/pkgs/development/tools/git-series/default.nix +++ b/pkgs/development/tools/git-series/default.nix @@ -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"; From 225a05906c3a9b4a9d59d00d10cbf7b86d7fc881 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Fri, 3 Nov 2017 17:48:42 +0000 Subject: [PATCH 7/8] julia_05: use libgit2_0_25 It's libgit2 test fails with libgit2 0.26.0. --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b02213de79d..8dcc65f175c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; From 62e18a947b88124e2728ec846ff9f90542cc77ed Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 5 Nov 2017 16:38:00 +0000 Subject: [PATCH 8/8] libgit2: delete obsolete patch --- pkgs/development/libraries/git2/0.25.nix | 10 ---- .../git2/disable-security.framework.patch | 58 ------------------- 2 files changed, 68 deletions(-) delete mode 100644 pkgs/development/libraries/git2/disable-security.framework.patch diff --git a/pkgs/development/libraries/git2/0.25.nix b/pkgs/development/libraries/git2/0.25.nix index ecc6552d1b4..679049a0e13 100644 --- a/pkgs/development/libraries/git2/0.25.nix +++ b/pkgs/development/libraries/git2/0.25.nix @@ -13,16 +13,6 @@ stdenv.mkDerivation (rec { sha256 = "1jhikg0gqpdzfzhgv44ybdpm24lvgkc7ki4306lc5lvmj1s2nylj"; }; - # 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 ]; diff --git a/pkgs/development/libraries/git2/disable-security.framework.patch b/pkgs/development/libraries/git2/disable-security.framework.patch deleted file mode 100644 index ce6a008b1c4..00000000000 --- a/pkgs/development/libraries/git2/disable-security.framework.patch +++ /dev/null @@ -1,58 +0,0 @@ -From fbc2ea65406236a740b8734dd41dc5ddbc24f8c9 Mon Sep 17 00:00:00 2001 -From: mulrich -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) -