build-fhs-userenv: added the option meta to be passed down to the final derivation.

This commit is contained in:
Matthew O'Gorman 2016-01-06 03:50:49 -05:00
parent a413b8fde1
commit c87ef76027
No known key found for this signature in database
GPG key ID: F71F32386DEAE4B2
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,5 @@
{ runCommand, lib, writeText, writeScriptBin, stdenv, bash, ruby } :
{ env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "" } :
{ env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "", importMeta ? {} } :
let
name = env.pname;
@ -26,6 +26,7 @@ let
'';
in runCommand name {
meta = importMeta;
passthru.env =
runCommand "${name}-shell-env" {
shellHook = ''

View file

@ -279,10 +279,11 @@ let
};
buildFHSUserEnv = args: userFHSEnv {
env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" "extraInstallCommands" ]);
env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" "extraInstallCommands" "meta" ]);
runScript = args.runScript or "bash";
extraBindMounts = args.extraBindMounts or [];
extraInstallCommands = args.extraInstallCommands or "";
importMeta = args.meta or {};
};
buildMaven = callPackage ../build-support/build-maven.nix {};