mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
build/config: add config.build.extraProotOptions
This commit is contained in:
parent
0703f6ceb9
commit
7b5a103e4a
2 changed files with 8 additions and 1 deletions
|
|
@ -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.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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 "$@"
|
||||||
''
|
''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue