2017-07-05 23:53:31 +02:00
|
|
|
{ stdenv, ruby, bundler, fetchFromGitLab, go }:
|
2014-10-25 18:22:49 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-04-25 19:55:58 +02:00
|
|
|
version = "7.1.2";
|
2014-10-25 18:22:49 +02:00
|
|
|
name = "gitlab-shell-${version}";
|
2015-01-25 22:10:04 +01:00
|
|
|
|
2016-01-30 14:47:04 +01:00
|
|
|
srcs = fetchFromGitLab {
|
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitlab-shell";
|
|
|
|
rev = "v${version}";
|
2018-04-25 19:55:58 +02:00
|
|
|
sha256 = "1mkr2k2ldn5hl84acajvfify97qy80lmicxx49jbpln22vh9rcni";
|
2014-10-25 18:22:49 +02:00
|
|
|
};
|
|
|
|
|
2018-01-07 04:58:31 +01:00
|
|
|
buildInputs = [ ruby bundler go ];
|
2014-10-25 18:22:49 +02:00
|
|
|
|
2017-07-05 23:53:31 +02:00
|
|
|
patches = [ ./remove-hardcoded-locations.patch ./fixes.patch ];
|
2016-01-30 14:47:04 +01:00
|
|
|
|
2014-10-25 18:22:49 +02:00
|
|
|
installPhase = ''
|
2017-07-05 23:53:31 +02:00
|
|
|
ruby bin/compile
|
2014-10-25 18:22:49 +02:00
|
|
|
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
|
|
|
|
'';
|
2015-01-25 22:10:04 +01:00
|
|
|
|
2014-10-25 18:22:49 +02:00
|
|
|
# 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 = ''
|
2018-03-19 21:52:36 +01:00
|
|
|
substituteInPlace lib/gitlab_config.rb --replace \
|
|
|
|
"File.join(ROOT_PATH, 'config.yml')" \
|
|
|
|
"'/run/gitlab/shell-config.yml'"
|
2014-10-25 18:22:49 +02:00
|
|
|
'';
|
|
|
|
|
2016-09-27 15:49:21 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.gitlab.com/;
|
|
|
|
platforms = platforms.unix;
|
2018-04-25 19:55:58 +02:00
|
|
|
maintainers = with maintainers; [ fpletz globin ];
|
2016-09-27 15:49:21 +02:00
|
|
|
license = licenses.mit;
|
2016-08-02 18:06:29 +02:00
|
|
|
};
|
2014-10-25 18:22:49 +02:00
|
|
|
}
|