mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/gitlab: Deduplicate runtime dependency listing
This commit is contained in:
parent
0211edd1ff
commit
bee6e1dafa
1 changed files with 12 additions and 2 deletions
|
@ -190,6 +190,16 @@ let
|
|||
MALLOC_ARENA_MAX = "2";
|
||||
} // cfg.extraEnv;
|
||||
|
||||
runtimeDeps = with pkgs; [
|
||||
nodejs
|
||||
gzip
|
||||
git
|
||||
gnutar
|
||||
postgresqlPackage
|
||||
coreutils
|
||||
procps
|
||||
];
|
||||
|
||||
gitlab-rake = pkgs.stdenv.mkDerivation {
|
||||
name = "gitlab-rake";
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
|
@ -199,7 +209,7 @@ let
|
|||
mkdir -p $out/bin
|
||||
makeWrapper ${cfg.packages.gitlab.rubyEnv}/bin/rake $out/bin/gitlab-rake \
|
||||
${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \
|
||||
--set PATH '${lib.makeBinPath [ pkgs.nodejs pkgs.gzip pkgs.git pkgs.gnutar postgresqlPackage pkgs.coreutils pkgs.procps ]}:$PATH' \
|
||||
--set PATH '${lib.makeBinPath runtimeDeps}:$PATH' \
|
||||
--set RAKEOPT '-f ${cfg.packages.gitlab}/share/gitlab/Rakefile' \
|
||||
--chdir '${cfg.packages.gitlab}/share/gitlab'
|
||||
'';
|
||||
|
@ -214,7 +224,7 @@ let
|
|||
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 postgresqlPackage pkgs.coreutils pkgs.procps ]}:$PATH' \
|
||||
--set PATH '${lib.makeBinPath runtimeDeps}:$PATH' \
|
||||
--chdir '${cfg.packages.gitlab}/share/gitlab'
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue