buildFHSEnvBubblewrap: allow deeper introspection via passthru
This commit is contained in:
parent
422b0ff93b
commit
192c3ecd4b
@ -1,6 +1,6 @@
|
||||
{ stdenv, lib, buildEnv, writeText, writeShellScriptBin, pkgs, pkgsi686Linux }:
|
||||
|
||||
{ name, profile ? ""
|
||||
args@{ name, profile ? ""
|
||||
, targetPkgs ? pkgs: [], multiPkgs ? pkgs: []
|
||||
, extraBuildCommands ? "", extraBuildCommandsMulti ? ""
|
||||
, extraOutputsToInstall ? []
|
||||
@ -216,4 +216,8 @@ in stdenv.mkDerivation {
|
||||
'';
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
||||
passthru = {
|
||||
inherit args multiPaths targetPaths;
|
||||
};
|
||||
}
|
@ -19,9 +19,9 @@ args @ {
|
||||
|
||||
with builtins;
|
||||
let
|
||||
buildFHSEnv = callPackage ./env.nix { };
|
||||
buildFHSEnv = callPackage ./buildFHSEnv.nix { };
|
||||
|
||||
env = buildFHSEnv (removeAttrs args [
|
||||
fhsenv = buildFHSEnv (removeAttrs args [
|
||||
"runScript" "extraInstallCommands" "meta" "passthru" "extraBwrapArgs" "dieWithParent"
|
||||
"unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc"
|
||||
]);
|
||||
@ -102,7 +102,7 @@ let
|
||||
ro_mounts=()
|
||||
symlinks=()
|
||||
etc_ignored=()
|
||||
for i in ${env}/*; do
|
||||
for i in ${fhsenv}/*; do
|
||||
path="/''${i##*/}"
|
||||
if [[ $path == '/etc' ]]; then
|
||||
:
|
||||
@ -115,8 +115,8 @@ let
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -d ${env}/etc ]]; then
|
||||
for i in ${env}/etc/*; do
|
||||
if [[ -d ${fhsenv}/etc ]]; then
|
||||
for i in ${fhsenv}/etc/*; do
|
||||
path="/''${i##*/}"
|
||||
# NOTE: we're binding /etc/fonts and /etc/ssl/certs from the host so we
|
||||
# don't want to override it with a path from the FHS environment.
|
||||
@ -215,6 +215,7 @@ in runCommandLocal name {
|
||||
echo >&2 ""
|
||||
exit 1
|
||||
'';
|
||||
inherit args fhsenv;
|
||||
};
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
|
Loading…
Reference in New Issue
Block a user