Skip to content

Commit e094813

Browse files
[Backport release-25.11] libgit2: fix gitstats test (#471796)
2 parents 9f60735 + ae53569 commit e094813

3 files changed

Lines changed: 20 additions & 12 deletions

File tree

pkgs/by-name/gi/gitstatus/package.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
zlib,
99
runtimeShell,
1010
}:
11+
let
12+
romkatv_libgit2 = callPackage ./romkatv_libgit2.nix { };
13+
in
1114
stdenv.mkDerivation rec {
1215
pname = "gitstatus";
1316
version = "1.5.5";
@@ -28,8 +31,8 @@ stdenv.mkDerivation rec {
2831
);
2932

3033
buildInputs = [
34+
romkatv_libgit2
3135
zlib
32-
(callPackage ./romkatv_libgit2.nix { })
3336
];
3437

3538
postPatch = ''
@@ -115,6 +118,10 @@ stdenv.mkDerivation rec {
115118
wait $!
116119
'';
117120

121+
passthru = {
122+
inherit romkatv_libgit2;
123+
};
124+
118125
meta = {
119126
description = "10x faster implementation of `git status` command";
120127
longDescription = ''
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
{ fetchFromGitHub, libgit2, ... }:
22

33
libgit2.overrideAttrs (oldAttrs: {
4+
pname = "romkatv_libgit2";
5+
6+
src = fetchFromGitHub {
7+
owner = "romkatv";
8+
repo = "libgit2";
9+
rev = "tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6";
10+
hash = "sha256-Bm3Gj9+AhNQMvkIqdrTkK5D9vrZ1qq6CS8Wrn9kfKiw=";
11+
};
12+
13+
patches = [ ];
14+
415
cmakeFlags = oldAttrs.cmakeFlags ++ [
516
"-DBUILD_CLAR=OFF"
617
"-DBUILD_SHARED_LIBS=OFF"
@@ -13,16 +24,7 @@ libgit2.overrideAttrs (oldAttrs: {
1324
"-DZERO_NSEC=ON"
1425
];
1526

16-
src = fetchFromGitHub {
17-
owner = "romkatv";
18-
repo = "libgit2";
19-
rev = "tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6";
20-
hash = "sha256-Bm3Gj9+AhNQMvkIqdrTkK5D9vrZ1qq6CS8Wrn9kfKiw=";
21-
};
22-
2327
# this is a heavy fork of the original libgit2
2428
# the original checkPhase does not work for this fork
2529
doCheck = false;
26-
27-
patches = [ ];
2830
})

pkgs/by-name/li/libgit2/package.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
lib,
33
stdenv,
44
fetchFromGitHub,
5-
fetchpatch,
65
cmake,
76
pkg-config,
87
python3,
@@ -93,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: {
9392
passthru.tests = lib.mapAttrs (_: v: v.override { libgit2 = finalAttrs.finalPackage; }) {
9493
inherit libgit2-glib;
9594
inherit (python3Packages) pygit2;
96-
inherit gitstatus;
95+
inherit (gitstatus) romkatv_libgit2;
9796
};
9897

9998
meta = {

0 commit comments

Comments
 (0)