@@ -106,20 +106,22 @@ let
106106
107107 unicornConfig = builtins.readFile ./defaultUnicornConfig.rb;
108108
109− gitlab-runner = pkgs.stdenv.mkDerivation rec {
110− name = "gitlab-runner";
109+ gitlab-rake = pkgs.stdenv.mkDerivation rec {
110+ name = "gitlab-rake";
111111 buildInputs = [ cfg.packages.gitlab cfg.packages.gitlab.env pkgs.makeWrapper ];
112112 phases = "installPhase fixupPhase";
113113 buildPhase = "";
114114 installPhase = ''
115115 mkdir -p $out/bin
116− makeWrapper ${cfg.packages.gitlab.env}/bin/bundle $out/bin/gitlab-runner \
116+ makeWrapper ${cfg.packages.gitlab.env}/bin/bundle $out/bin/gitlab-bundle \
117117 ${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \
118118 --set GITLAB_CONFIG_PATH '${cfg.statePath}/config' \
119119 --set PATH '${pkgs.nodejs}/bin:${pkgs.gzip}/bin:${config.services.postgresql.package}/bin:$PATH' \
120120 --set RAKEOPT '-f ${cfg.packages.gitlab}/share/gitlab/Rakefile' \
121121 --run 'cd ${cfg.packages.gitlab}/share/gitlab'
122− '';
122+ makeWrapper $out/bin/gitlab-bundle $out/bin/gitlab-rake \
123+ --add-flags "exec rake"
124+ '';
123125 };
124126
125127 smtpSettings = pkgs.writeText "gitlab-smtp-settings.rb" ''
@@ -331,7 +333,7 @@ in {
331333
332334 config = mkIf cfg.enable {
333335
334− environment.systemPackages = [ pkgs.git gitlab-runner cfg.packages.gitlab-shell ];
336+ environment.systemPackages = [ pkgs.git gitlab-rake cfg.packages.gitlab-shell ];
335337
336338 assertions = [
337339 { assertion = cfg.databasePassword != "";
@@ -480,14 +482,14 @@ in {
480482 touch "${cfg.statePath}/db-created"
481483
482484 # The gitlab:setup task is horribly broken somehow, these two tasks will do the same for setting up the initial database
483− ${gitlab-runner}/bin/gitlab-runner exec rake db:migrate RAILS_ENV=production
484− ${gitlab-runner}/bin/gitlab-runner exec rake db:seed_fu RAILS_ENV=production \
485+ ${gitlab-rake}/bin/gitlab-rake db:migrate RAILS_ENV=production
486+ ${gitlab-rake}/bin/gitlab-rake db:seed_fu RAILS_ENV=production \
485487 GITLAB_ROOT_PASSWORD="${cfg.initialRootPassword}" GITLAB_ROOT_EMAIL="${cfg.initialRootEmail}";
486488 fi
487489 fi
488490
489491 # Always do the db migrations just to be sure the database is up-to-date
490− ${gitlab-runner}/bin/gitlab-runner exec rake db:migrate RAILS_ENV=production
492+ ${gitlab-rake}/bin/gitlab-rake db:migrate RAILS_ENV=production
491493
492494 # Change permissions in the last step because some of the
493495 # intermediary scripts like to create directories as root.