build/config: add config.build.extraProotOptions

This commit is contained in:
Alexander Sosedkin 2020-11-07 16:12:59 +01:00
parent 0703f6ceb9
commit 7b5a103e4a
2 changed files with 8 additions and 1 deletions

View file

@ -35,6 +35,12 @@ with lib;
readOnly = true; readOnly = true;
description = "Path to installation directory."; description = "Path to installation directory.";
}; };
extraProotOptions = mkOption {
type = types.listOf types.string;
default = [];
description = "Extra options passed to proot, e.g., extra bind mounts.";
};
}; };
}; };

View file

@ -3,7 +3,7 @@
{ config, writeScript }: { config, writeScript }:
let let
inherit (config.build) installationDir; inherit (config.build) installationDir extraProotOptions;
in in
writeScript "login" '' writeScript "login" ''
@ -36,5 +36,6 @@ writeScript "login" ''
-b ${installationDir}/usr:/usr \ -b ${installationDir}/usr:/usr \
-b /:/android \ -b /:/android \
--link2symlink \ --link2symlink \
${builtins.concatStringsSep " " extraProotOptions} \
${installationDir}/bin/sh ${installationDir}/usr/lib/login-inner "$@" ${installationDir}/bin/sh ${installationDir}/usr/lib/login-inner "$@"
'' ''