2017-07-05 22:53:31 +01:00
|
|
|
{ stdenv, ruby, bundler, fetchFromGitLab, go }:
|
2014-10-25 17:22:49 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-12-24 02:42:53 +00:00
|
|
|
version = "8.4.3";
|
2014-10-25 17:22:49 +01:00
|
|
|
name = "gitlab-shell-${version}";
|
2015-01-25 21:10:04 +00:00
|
|
|
|
2018-09-21 08:34:26 +01:00
|
|
|
src = fetchFromGitLab {
|
2016-01-30 13:47:04 +00:00
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitlab-shell";
|
|
|
|
rev = "v${version}";
|
2018-12-24 02:42:53 +00:00
|
|
|
sha256 = "0ah039xpff1gmj36rm1ns8lb1k3di49lmnphl54bc45wnj72lw57";
|
2014-10-25 17:22:49 +01:00
|
|
|
};
|
|
|
|
|
2018-01-07 03:58:31 +00:00
|
|
|
buildInputs = [ ruby bundler go ];
|
2014-10-25 17:22:49 +01:00
|
|
|
|
2018-09-21 08:34:26 +01:00
|
|
|
patches = [ ./remove-hardcoded-locations.patch ];
|
2016-01-30 13:47:04 +00:00
|
|
|
|
2014-10-25 17:22:49 +01:00
|
|
|
installPhase = ''
|
2017-07-05 22:53:31 +01:00
|
|
|
ruby bin/compile
|
2014-10-25 17:22:49 +01: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 21:10:04 +00:00
|
|
|
|
2014-10-25 17:22:49 +01: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 20:52:36 +00:00
|
|
|
substituteInPlace lib/gitlab_config.rb --replace \
|
|
|
|
"File.join(ROOT_PATH, 'config.yml')" \
|
|
|
|
"'/run/gitlab/shell-config.yml'"
|
2014-10-25 17:22:49 +01:00
|
|
|
'';
|
|
|
|
|
2016-09-27 14:49:21 +01:00
|
|
|
meta = with stdenv.lib; {
|
2018-09-21 08:34:26 +01:00
|
|
|
description = "SSH access and repository management app for GitLab";
|
2016-09-27 14:49:21 +01:00
|
|
|
homepage = http://www.gitlab.com/;
|
|
|
|
platforms = platforms.unix;
|
2018-04-25 18:55:58 +01:00
|
|
|
maintainers = with maintainers; [ fpletz globin ];
|
2016-09-27 14:49:21 +01:00
|
|
|
license = licenses.mit;
|
2016-08-02 17:06:29 +01:00
|
|
|
};
|
2014-10-25 17:22:49 +01:00
|
|
|
}
|