mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 21:18:28 +03:00
nixos/gitlab: Package gitlab-rails
This utility (particularly `gitlab-rails console`) is packaged by GitLab Omnibus and is used for diagnostics and maintenance operations.
This commit is contained in:
parent
d984875aff
commit
af909b3238
@ -160,6 +160,20 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
gitlab-rails = pkgs.stdenv.mkDerivation rec {
|
||||
name = "gitlab-rails";
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
dontBuild = true;
|
||||
unpackPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${cfg.packages.gitlab.rubyEnv}/bin/rails $out/bin/gitlab-rails \
|
||||
${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \
|
||||
--set PATH '${lib.makeBinPath [ pkgs.nodejs pkgs.gzip pkgs.git pkgs.gnutar config.services.postgresql.package pkgs.coreutils pkgs.procps ]}:$PATH' \
|
||||
--run 'cd ${cfg.packages.gitlab}/share/gitlab'
|
||||
'';
|
||||
};
|
||||
|
||||
extraGitlabRb = pkgs.writeText "extra-gitlab.rb" cfg.extraGitlabRb;
|
||||
|
||||
smtpSettings = pkgs.writeText "gitlab-smtp-settings.rb" ''
|
||||
@ -461,7 +475,7 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.git gitlab-rake cfg.packages.gitlab-shell ];
|
||||
environment.systemPackages = [ pkgs.git gitlab-rake gitlab-rails cfg.packages.gitlab-shell ];
|
||||
|
||||
# Redis is required for the sidekiq queue runner.
|
||||
services.redis.enable = mkDefault true;
|
||||
|
Loading…
Reference in New Issue
Block a user