3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix
Ben Gamari 363b352af3 gitlab: 11.10.8 -> 12.0.3
This is a major version bump but things were generally straightforward
save two wrinkles:

 * it is necessary to ignore collisions in the gitlab bundler
   environment as both `omniauth_oauth2_generic` and
   `apollo_upload_server` provide a `console` executable.

 * grpc had to be patched since its build system expects the `AR`
   environment variable to contain not just the path to `ar` but
   also the `rpc` flags (see the discussion in nixpkgs #63056).
2019-07-14 23:03:39 +02:00

48 lines
1.3 KiB
Nix

{ stdenv, ruby, bundler, fetchFromGitLab, go }:
stdenv.mkDerivation rec {
version = "9.3.0";
name = "gitlab-shell-${version}";
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitlab-shell";
rev = "v${version}";
sha256 = "1r000h4sgplx7giqvqs5iy0zh3drf6qa1iiq0mxlk3h9fshs1348";
};
buildInputs = [ ruby bundler go ];
patches = [ ./remove-hardcoded-locations.patch ];
installPhase = ''
export GOCACHE="$TMPDIR/go-cache"
ruby bin/compile
mkdir -p $out/
cp -R . $out/
# Nothing to install ATM for non-development but keeping the
# install command anyway in case that changes in the future:
export HOME=$(pwd)
bundle install -j4 --verbose --local --deployment --without development test
'';
# 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
postPatch = ''
substituteInPlace lib/gitlab_config.rb --replace \
"File.join(ROOT_PATH, 'config.yml')" \
"'/run/gitlab/shell-config.yml'"
'';
meta = with stdenv.lib; {
description = "SSH access and repository management app for GitLab";
homepage = http://www.gitlab.com/;
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz globin ];
license = licenses.mit;
};
}