diff options
Diffstat (limited to 'pkgs/applications/version-management/gitlab/gitaly')
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitaly/default.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitaly/git.nix | 57 |
2 files changed, 67 insertions, 5 deletions
diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix index fb175aad462a6..68acfdcf53430 100644 --- a/pkgs/applications/version-management/gitlab/gitaly/default.nix +++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix @@ -1,14 +1,17 @@ { lib +, callPackage , fetchFromGitLab , buildGoModule , pkg-config }: let - version = "16.11.4"; + version = "17.2.5"; package_version = "v${lib.versions.major version}"; gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}"; + git = callPackage ./git.nix { }; + commonOpts = { inherit version; @@ -17,17 +20,15 @@ let owner = "gitlab-org"; repo = "gitaly"; rev = "v${version}"; - hash = "sha256-sdRKKOWoX0yyqUGpu/mqDdTq2nLZ2Gr5GNV9x99rdeU="; + hash = "sha256-R6GmIBU7rzLBsegcXPjc9Dxp9qe3tP6unqOsnyiozgw="; }; - vendorHash = "sha256-WCZF7XVW6J1zyPx8e/Mcn+HmHElAUGcEICxiF5HLzBg="; + vendorHash = "sha256-FqnGVRldhevJgBBvJcvGXzRaYWqSHzZiXIQmCNzJv+4="; ldflags = [ "-X ${gitaly_package}/internal/version.version=${version}" "-X ${gitaly_package}/internal/version.moduleVersion=${version}" ]; tags = [ "static" ]; - nativeBuildInputs = [ pkg-config ]; - doCheck = false; }; @@ -49,6 +50,10 @@ buildGoModule ({ outputs = [ "out" ]; + passthru = { + inherit git; + }; + meta = with lib; { homepage = "https://gitlab.com/gitlab-org/gitaly"; description = "Git RPC service for handling all the git calls made by GitLab"; diff --git a/pkgs/applications/version-management/gitlab/gitaly/git.nix b/pkgs/applications/version-management/gitlab/gitaly/git.nix new file mode 100644 index 0000000000000..a6d272b2fbb7a --- /dev/null +++ b/pkgs/applications/version-management/gitlab/gitaly/git.nix @@ -0,0 +1,57 @@ +{ stdenv +, lib +, gitaly +, fetchFromGitLab +, curl +, pcre2 +, zlib +}: + +stdenv.mkDerivation rec { + pname = "gitaly-git"; + version = "2.44.2.gl1"; + + # `src` attribute for nix-update + src = fetchFromGitLab { + owner = "gitlab-org"; + repo = "git"; + rev = "v${version}"; + hash = "sha256-VIffbZZEbGjVW1No8zojSQlX/ciJ2DJnaogNlQtc77o="; + }; + + # we actually use the gitaly build system + unpackPhase = '' + cp -r ${gitaly.src} source + chmod -R +w source + + mkdir -p source/_build/deps + + cp -r ${src} source/_build/deps/git-distribution + chmod -R +w source/_build/deps/git-distribution + + # FIXME? maybe just patch the makefile? + echo -n 'v${version} DEVELOPER=1 DEVOPTS=no-error USE_LIBPCRE=YesPlease NO_PERL=YesPlease NO_EXPAT=YesPlease NO_TCLTK=YesPlease NO_GETTEXT=YesPlease NO_PYTHON=YesPlease' > source/_build/deps/git-distribution.version + echo -n 'v${version}' > source/_build/deps/git-distribution/version + ''; + sourceRoot = "source"; + + buildFlags = [ "git" ]; + + buildInputs = [ + curl + pcre2 + zlib + ]; + + # The build phase already installs it all + GIT_PREFIX = placeholder "out"; + dontInstall = true; + + meta = { + homepage = "https://git-scm.com/"; + description = "Distributed version control system - with Gitaly patches"; + license = lib.licenses.gpl2Only; + platforms = lib.platforms.all; + maintainers = lib.teams.gitlab.members; + }; +} |