biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / version-management / gitlab / gitaly / default.nix
blobb0adadb93efc8cdf998b9db70c757f3968728a10
1 { lib
2 , fetchFromGitLab
3 , fetchFromGitHub
4 , buildGoModule
5 , pkg-config
6 }:
8 let
9   version = "16.10.3";
10   package_version = "v${lib.versions.major version}";
11   gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}";
13   commonOpts = {
14     inherit version;
16     # nixpkgs-update: no auto update
17     src = fetchFromGitLab {
18       owner = "gitlab-org";
19       repo = "gitaly";
20       rev = "v${version}";
21       hash = "sha256-WdEYZL3g/aYh2Iy1ZgJhIHgQ4967FOxhiuQEokk1S2A=";
22     };
24     vendorHash = "sha256-zaldiRg7fk/HncpfR7k+dDprsOp1ziQHgX8B4l7bwe0=";
26     ldflags = [ "-X ${gitaly_package}/internal/version.version=${version}" "-X ${gitaly_package}/internal/version.moduleVersion=${version}" ];
28     tags = [ "static" ];
30     nativeBuildInputs = [ pkg-config ];
32     doCheck = false;
33   };
35   auxBins = buildGoModule ({
36     pname = "gitaly-aux";
38     subPackages = [ "cmd/gitaly-hooks" "cmd/gitaly-ssh" "cmd/gitaly-lfs-smudge" "cmd/gitaly-gpg" ];
39   } // commonOpts);
41 buildGoModule ({
42   pname = "gitaly";
44   subPackages = [ "cmd/gitaly" "cmd/gitaly-backup" ];
46   preConfigure = ''
47     mkdir -p _build/bin
48     cp -r ${auxBins}/bin/* _build/bin
49   '';
51   outputs = [ "out" ];
53   meta = with lib; {
54     homepage = "https://gitlab.com/gitlab-org/gitaly";
55     description = "A Git RPC service for handling all the git calls made by GitLab";
56     platforms = platforms.linux ++ [ "x86_64-darwin" ];
57     maintainers = teams.gitlab.members;
58     license = licenses.mit;
59   };
60 } // commonOpts)