diff options
author | Kim Lindberger <kim.lindberger@gmail.com> | 2021-09-03 13:23:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-03 13:23:00 +0200 |
commit | d14e9188d1cd88f1b530bf860638c2de27486a6d (patch) | |
tree | 531d61805a40d3031d6d70cf462639f4c9acbbdc /pkgs/applications/version-management/gitlab | |
parent | 0a15fd6d74ead87ec2730fffad79d8cedcbaa8ad (diff) |
gitaly: Fix gitaly-git2go binary name (#136569)
https://gitlab.com/gitlab-org/gitaly/-/commit/e7f8fe4f6759669c24b2fd216beaab4a477c5b3d changed the binary name to always end with its module version. This makes sure gitaly's internal version references are set to the package version and renames the binary, postfixing it with the package version.
Diffstat (limited to 'pkgs/applications/version-management/gitlab')
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitaly/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix index ac3bc1653ab92..81a92d21f9448 100644 --- a/pkgs/applications/version-management/gitlab/gitaly/default.nix +++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix @@ -10,9 +10,13 @@ let copyGemFiles = true; gemdir = ./.; }; -in buildGoModule rec { version = "14.2.1"; + gitaly_package = "gitlab.com/gitlab-org/gitaly/v${lib.versions.major version}"; +in + +buildGoModule { pname = "gitaly"; + inherit version; src = fetchFromGitLab { owner = "gitlab-org"; @@ -27,6 +31,8 @@ in buildGoModule rec { inherit rubyEnv; }; + ldflags = "-X ${gitaly_package}/internal/version.version=${version} -X ${gitaly_package}/internal/version.moduleVersion=${version}"; + tags = [ "static,system_libgit2" ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ rubyEnv.wrappedRuby libgit2 openssl zlib pcre http-parser ]; @@ -35,6 +41,7 @@ in buildGoModule rec { postInstall = '' mkdir -p $ruby cp -rv $src/ruby/{bin,lib,proto,git-hooks} $ruby + mv $out/bin/gitaly-git2go $out/bin/gitaly-git2go-${version} ''; outputs = [ "out" "ruby" ]; |