Merge pull request #317275 from eclairevoyant/libgit2
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
, libgit2
|
||||
, glib
|
||||
, python3
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -26,6 +27,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "EzHa2oOPTh9ZGyZFnUQSajJd52LcPNJhU6Ma+9/hgZA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "support-libgit2-1.8.patch";
|
||||
# https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/40
|
||||
url = "https://gitlab.gnome.org/GNOME/libgit2-glib/-/commit/a76fdf96c3af9ce9d21a3985c4be8a1aa6eea661.patch";
|
||||
hash = "sha256-ysU8pAixyftensfEC9bE0RUFMPMei0jYT26WKN5uOFE=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
, libssh2
|
||||
, openssl
|
||||
, pcre
|
||||
, http-parser
|
||||
, libiconv
|
||||
, Security
|
||||
, staticBuild ? stdenv.hostPlatform.isStatic
|
||||
@@ -16,11 +15,14 @@
|
||||
, libgit2-glib
|
||||
, python3Packages
|
||||
, gitstatus
|
||||
, llhttp
|
||||
, withGssapi ? false
|
||||
, krb5
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libgit2";
|
||||
version = "1.7.2";
|
||||
version = "1.8.1";
|
||||
# also check the following packages for updates: python3Packages.pygit2 and libgit2-glib
|
||||
|
||||
outputs = ["lib" "dev" "out"];
|
||||
@@ -28,13 +30,14 @@ stdenv.mkDerivation rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "libgit2";
|
||||
repo = "libgit2";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-fVPY/byE2/rxmv/bUykcAbmUFMlF3UZogVuTzjOXJUU=";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_HTTP_PARSER=system"
|
||||
"-DUSE_SSH=ON"
|
||||
(lib.cmakeBool "USE_GSSAPI" withGssapi)
|
||||
"-DBUILD_SHARED_LIBS=${if staticBuild then "OFF" else "ON"}"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isWindows [
|
||||
"-DDLLTOOL=${stdenv.cc.bintools.targetPrefix}dlltool"
|
||||
@@ -44,7 +47,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake python3 pkg-config ];
|
||||
|
||||
buildInputs = [ zlib libssh2 openssl pcre http-parser ]
|
||||
buildInputs = [ zlib libssh2 openssl pcre llhttp ]
|
||||
++ lib.optional withGssapi krb5
|
||||
++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv;
|
||||
@@ -66,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
)
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
passthru.tests = lib.mapAttrs (_: v: v.override { libgit2 = finalAttrs.finalPackage; }) {
|
||||
inherit libgit2-glib;
|
||||
inherit (python3Packages) pygit2;
|
||||
inherit gitstatus;
|
||||
@@ -80,4 +84,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pygit2";
|
||||
version = "1.14.1";
|
||||
version = "1.15.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-7FlYVxuCpjUXhcpkXlOUwxrkXuxThLL6nE4F3eNZetY=";
|
||||
hash = "sha256-pjVSX/x0EoZp3i9jRgqUydVgljSkh1wKr85RD97sF6w=";
|
||||
};
|
||||
|
||||
preConfigure = lib.optionalString stdenv.isDarwin ''
|
||||
|
||||
Reference in New Issue
Block a user