at 18.09-beta 44 lines 1.2 kB view raw
1{ stdenv, ruby, bundler, fetchFromGitLab, go }: 2 3stdenv.mkDerivation rec { 4 version = "7.1.2"; 5 name = "gitlab-shell-${version}"; 6 7 srcs = fetchFromGitLab { 8 owner = "gitlab-org"; 9 repo = "gitlab-shell"; 10 rev = "v${version}"; 11 sha256 = "1mkr2k2ldn5hl84acajvfify97qy80lmicxx49jbpln22vh9rcni"; 12 }; 13 14 buildInputs = [ ruby bundler go ]; 15 16 patches = [ ./remove-hardcoded-locations.patch ./fixes.patch ]; 17 18 installPhase = '' 19 ruby bin/compile 20 mkdir -p $out/ 21 cp -R . $out/ 22 23 # Nothing to install ATM for non-development but keeping the 24 # install command anyway in case that changes in the future: 25 export HOME=$(pwd) 26 bundle install -j4 --verbose --local --deployment --without development test 27 ''; 28 29 # gitlab-shell will try to read its config relative to the source 30 # code by default which doesn't work in nixos because it's a 31 # read-only filesystem 32 postPatch = '' 33 substituteInPlace lib/gitlab_config.rb --replace \ 34 "File.join(ROOT_PATH, 'config.yml')" \ 35 "'/run/gitlab/shell-config.yml'" 36 ''; 37 38 meta = with stdenv.lib; { 39 homepage = http://www.gitlab.com/; 40 platforms = platforms.unix; 41 maintainers = with maintainers; [ fpletz globin ]; 42 license = licenses.mit; 43 }; 44}