mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
buildFHS{Chroot,User}Env: support extraInstallCommands
This commit is contained in:
parent
634c9db4c2
commit
00f6ce133c
@ -1,4 +1,4 @@
|
||||
{ stdenv } : { env } :
|
||||
{ stdenv } : { env, extraInstallCommands ? "" } :
|
||||
|
||||
let
|
||||
# References to shell scripts that set up or tear down the environment
|
||||
@ -43,5 +43,6 @@ in stdenv.mkDerivation {
|
||||
-e "s|@name@|${name}|g" \
|
||||
${destroySh} > destroy-${name}-chrootenv
|
||||
chmod +x destroy-${name}-chrootenv
|
||||
${extraInstallCommands}
|
||||
'';
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ runCommand, lib, writeText, writeScriptBin, stdenv, ruby } : { env, runScript ? "bash", extraBindMounts ? [] } :
|
||||
{ runCommand, lib, writeText, writeScriptBin, stdenv, ruby } :
|
||||
{ env, runScript ? "bash", extraBindMounts ? [], extraInstallCommands ? "" } :
|
||||
|
||||
let
|
||||
name = env.pname;
|
||||
@ -44,4 +45,5 @@ in runCommand name {
|
||||
exec ${chroot-user}/bin/chroot-user ${env} bash -l ${init runScript} "\$(pwd)" "\$@"
|
||||
EOF
|
||||
chmod +x $out/bin/${name}
|
||||
${extraInstallCommands}
|
||||
''
|
||||
|
@ -273,13 +273,15 @@ let
|
||||
};
|
||||
|
||||
buildFHSChrootEnv = args: chrootFHSEnv {
|
||||
env = buildFHSEnv args;
|
||||
env = buildFHSEnv (removeAttrs args [ "extraInstallCommands" ]);
|
||||
extraInstallCommands = args.extraInstallCommands or "";
|
||||
};
|
||||
|
||||
buildFHSUserEnv = args: userFHSEnv {
|
||||
env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" ]);
|
||||
env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" "extraInstallCommands" ]);
|
||||
runScript = args.runScript or "bash";
|
||||
extraBindMounts = args.extraBindMounts or [];
|
||||
extraInstallCommands = args.extraInstallCommands or "";
|
||||
};
|
||||
|
||||
buildMaven = callPackage ../build-support/build-maven.nix {};
|
||||
|
Loading…
Reference in New Issue
Block a user