Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
85 lines
1.8 KiB
Nix
85 lines
1.8 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
gitaly,
|
|
fetchFromGitLab,
|
|
curl,
|
|
pcre2,
|
|
zlib,
|
|
git,
|
|
pkg-config,
|
|
openssl,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gitaly-git";
|
|
version = "2.50.1.gl1";
|
|
|
|
# `src` attribute for nix-update
|
|
src = fetchFromGitLab {
|
|
owner = "gitlab-org";
|
|
repo = "git";
|
|
rev = "v${version}";
|
|
hash = "sha256-q+xQAVsatw0vS4iIgAxciAVVMr33BjG0yM4AvZrXB+8=";
|
|
leaveDotGit = true;
|
|
# The build system clones the repo from the store (since it always expects
|
|
# to be able to clone in the makefiles) and it looks like nix doesn't leave
|
|
# the tag so we re-add it.
|
|
postFetch = ''
|
|
git -C $out tag v${version};
|
|
'';
|
|
};
|
|
|
|
# Use gitaly and their build system as source root
|
|
unpackPhase = ''
|
|
cp -r ${gitaly.src} source
|
|
chmod -R +w source
|
|
git config --global --add safe.directory '*'
|
|
'';
|
|
|
|
sourceRoot = src.name;
|
|
|
|
buildFlags = [ "git" ];
|
|
GIT_REPO_URL = src;
|
|
HOME = "/build";
|
|
|
|
nativeBuildInputs = [
|
|
git # clones our repo from the store
|
|
pkg-config
|
|
];
|
|
# git inputs
|
|
buildInputs = [
|
|
openssl
|
|
zlib
|
|
pcre2
|
|
curl
|
|
];
|
|
|
|
# required to support pthread_cancel()
|
|
NIX_LDFLAGS =
|
|
lib.optionalString (stdenv.cc.isGNU && stdenv.hostPlatform.libc == "glibc") "-lgcc_s"
|
|
+ lib.optionalString stdenv.isFreeBSD "-lthr";
|
|
|
|
# The build phase already installs it all
|
|
GIT_PREFIX = placeholder "out";
|
|
dontInstall = true;
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
HOME=/build PAGER=cat $out/bin/git config -l
|
|
file $out/bin/git | grep -qv 'too large section header'
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://git-scm.com/";
|
|
description = "Distributed version control system - with Gitaly patches";
|
|
license = lib.licenses.gpl2Only;
|
|
platforms = lib.platforms.all;
|
|
teams = [ lib.teams.gitlab ];
|
|
};
|
|
}
|