Unverified Commit 7d437886 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

libgit2: fix gitstats test (#471488)

parents a5ec1c37 7a2eb1cf
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -8,6 +8,9 @@
  zlib,
  runtimeShell,
}:
let
  romkatv_libgit2 = callPackage ./romkatv_libgit2.nix { };
in
stdenv.mkDerivation rec {
  pname = "gitstatus";
  version = "1.5.5";
@@ -28,8 +31,8 @@ stdenv.mkDerivation rec {
  );

  buildInputs = [
    romkatv_libgit2
    zlib
    (callPackage ./romkatv_libgit2.nix { })
  ];

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

  passthru = {
    inherit romkatv_libgit2;
  };

  meta = {
    description = "10x faster implementation of `git status` command";
    longDescription = ''
+11 −9
Original line number Diff line number Diff line
{ fetchFromGitHub, libgit2, ... }:

libgit2.overrideAttrs (oldAttrs: {
  pname = "romkatv_libgit2";

  src = fetchFromGitHub {
    owner = "romkatv";
    repo = "libgit2";
    rev = "tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6";
    hash = "sha256-Bm3Gj9+AhNQMvkIqdrTkK5D9vrZ1qq6CS8Wrn9kfKiw=";
  };

  patches = [ ];

  cmakeFlags = oldAttrs.cmakeFlags ++ [
    "-DBUILD_CLAR=OFF"
    "-DBUILD_SHARED_LIBS=OFF"
@@ -13,16 +24,7 @@ libgit2.overrideAttrs (oldAttrs: {
    "-DZERO_NSEC=ON"
  ];

  src = fetchFromGitHub {
    owner = "romkatv";
    repo = "libgit2";
    rev = "tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6";
    hash = "sha256-Bm3Gj9+AhNQMvkIqdrTkK5D9vrZ1qq6CS8Wrn9kfKiw=";
  };

  # this is a heavy fork of the original libgit2
  # the original checkPhase does not work for this fork
  doCheck = false;

  patches = [ ];
})
+1 −2
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  pkg-config,
  python3,
@@ -93,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: {
  passthru.tests = lib.mapAttrs (_: v: v.override { libgit2 = finalAttrs.finalPackage; }) {
    inherit libgit2-glib;
    inherit (python3Packages) pygit2;
    inherit gitstatus;
    inherit (gitstatus) romkatv_libgit2;
  };

  meta = {