1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00
nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

2017-09-03 14:38:28 +01:00
{ stdenv, fetchFromGitLab, buildGoPackage, ruby, bundlerEnv }:
2017-07-05 22:53:31 +01:00
2017-09-03 14:38:28 +01:00
let
rubyEnv = bundlerEnv {
name = "gitaly-env";
inherit ruby;
gemdir = ./.;
};
in buildGoPackage rec {
2019-07-04 22:52:04 +01:00
version = "1.34.3";
2017-07-05 22:53:31 +01:00
name = "gitaly-${version}";
2017-09-03 14:38:28 +01:00
src = fetchFromGitLab {
2017-07-05 22:53:31 +01:00
owner = "gitlab-org";
repo = "gitaly";
rev = "v${version}";
2019-07-04 22:52:04 +01:00
sha256 = "0lv3czkxcan2zv9asd79nn8z1bihyxszi1d5hazmb299v23cppzm";
2017-07-05 22:53:31 +01:00
};
2017-09-03 14:38:28 +01:00
goPackagePath = "gitlab.com/gitlab-org/gitaly";
2017-07-05 22:53:31 +01:00
2017-09-03 14:38:28 +01:00
passthru = {
inherit rubyEnv;
};
2018-09-25 01:11:36 +01:00
2018-09-21 08:33:18 +01:00
buildInputs = [ rubyEnv.wrappedRuby ];
2017-09-03 14:38:28 +01:00
postInstall = ''
mkdir -p $ruby
2019-05-06 18:11:11 +01:00
cp -rv $src/ruby/{bin,lib,git-hooks,gitlab-shell} $ruby
# gitlab-shell will try to read its config relative to the source
# code by default which doesn't work in nixos because it's a
# read-only filesystem
2019-05-06 18:11:11 +01:00
substituteInPlace $ruby/gitlab-shell/lib/gitlab_config.rb --replace \
"File.join(ROOT_PATH, 'config.yml')" \
"'/run/gitlab/shell-config.yml'"
2017-07-05 22:53:31 +01:00
'';
2017-09-03 14:38:28 +01:00
outputs = [ "bin" "out" "ruby" ];
2017-07-05 22:53:31 +01:00
meta = with stdenv.lib; {
homepage = http://www.gitlab.com/;
platforms = platforms.unix;
maintainers = with maintainers; [ roblabla ];
license = licenses.mit;
};
}