From f146c92955309ecc4d8be5c29be6028b97557703 Mon Sep 17 00:00:00 2001 From: Yureka Date: Mon, 29 Nov 2021 18:37:36 +0100 Subject: [PATCH] gitaly: use custom libgit2 commit --- .../version-management/gitlab/gitaly/default.nix | 14 +++++++++++++- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix index c997bb019688..4dacc906a3ae 100644 --- a/pkgs/applications/version-management/gitlab/gitaly/default.nix +++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix @@ -4,6 +4,18 @@ , libgit2, openssl, zlib, pcre, http-parser }: let + # git2go 32.0.5 does not support libgit2 1.2.0 or 1.3.0. + # It needs a specific commit in between those two releases. + libgit2_custom = libgit2.overrideAttrs (oldAttrs: rec { + version = "1.2.0"; + src = fetchFromGitHub { + owner = "libgit2"; + repo = "libgit2"; + rev = "109b4c887ffb63962c7017a66fc4a1f48becb48e"; + sha256 = "sha256-w029FHpOv5K49wE1OJMOlkTe+2cv+ORYqEHxs59GDBI="; + }; + }); + rubyEnv = bundlerEnv rec { name = "gitaly-env"; inherit ruby; @@ -46,7 +58,7 @@ buildGoModule { tags = [ "static,system_libgit2" ]; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ rubyEnv.wrappedRuby libgit2 openssl zlib pcre http-parser ]; + buildInputs = [ rubyEnv.wrappedRuby libgit2_custom openssl zlib pcre http-parser ]; doCheck = false; postInstall = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 67756bb1451a..989847dbe0e9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5753,9 +5753,7 @@ with pkgs; gitleaks = callPackage ../tools/security/gitleaks { }; - gitaly = callPackage ../applications/version-management/gitlab/gitaly { - libgit2 = libgit2_1_1; # git2go only supports v1.1.x - }; + gitaly = callPackage ../applications/version-management/gitlab/gitaly { }; gitstats = callPackage ../applications/version-management/gitstats { };