From ce1b0c05a52f70fbf03c277018384c9bac3fdf56 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 5 Nov 2017 05:03:17 +0000 Subject: [PATCH] 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 { };