nixos/plymouth: fix theme dependency resolution in systemd stage 1
Some plymouth themes use assets of others, like is the case with our default bgrt depending on spinner. Missing assets would cause the splashscreen to not render at all in stage 1. Preliminary dependency resolution code seemed to be broken, and this should fix it. Only direct dependencies of selected theme are pulled in.
This commit is contained in:
parent
15e41e3edf
commit
348b88545c
1 changed files with 8 additions and 3 deletions
|
@ -184,9 +184,14 @@ in
|
|||
mkdir $out
|
||||
cp -r ${themesEnv}/share/plymouth/themes/${cfg.theme} $out
|
||||
# Copy more themes if the theme depends on others
|
||||
for theme in $(grep -hRo '/etc/plymouth/themes/.*$' ${themesEnv} | xargs -n1 basename); do
|
||||
if [[ -d "${themesEnv}/theme" ]]; then
|
||||
cp -r "${themesEnv}/theme" $out
|
||||
for theme in $(grep -hRo '/etc/plymouth/themes/.*$' $out | xargs -n1 basename); do
|
||||
if [[ -d "${themesEnv}/share/plymouth/themes/$theme" ]]; then
|
||||
if [[ ! -d "$out/$theme" ]]; then
|
||||
echo "Adding dependent theme: $theme"
|
||||
cp -r "${themesEnv}/share/plymouth/themes/$theme" $out
|
||||
fi
|
||||
else
|
||||
echo "Missing theme dependency: $theme"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue