Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libgit2: 1.7.2 -> 1.8.1; python312Packages.pygit2: 1.14.1 -> 1.15.0 #317275

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkgs/development/libraries/libgit2-glib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
, libgit2
, glib
, python3
, fetchpatch
}:

stdenv.mkDerivation rec {
Expand All @@ -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
Expand Down
20 changes: 12 additions & 8 deletions pkgs/development/libraries/libgit2/default.nix
eclairevoyant marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,36 @@
, libssh2
, openssl
, pcre
, http-parser
, libiconv
, Security
, staticBuild ? stdenv.hostPlatform.isStatic
# for passthru.tests
, 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"];

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"
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -80,4 +84,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}
})
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pygit2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down