mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-11-05 13:26:14 +01:00
Merge pull request #235 from Ate329/dev
Fix NixOS build failure due to missing files
This commit is contained in:
commit
24ac05a101
13
flake.nix
13
flake.nix
@ -32,7 +32,15 @@
|
|||||||
src = "${self}";
|
src = "${self}";
|
||||||
buildInputs = [ pkgs.imagemagick ];
|
buildInputs = [ pkgs.imagemagick ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/grub/themes;
|
mkdir -p $out/grub/themes
|
||||||
|
|
||||||
|
# Create placeholder terminal box PNGs that install.sh expects
|
||||||
|
mkdir -p common
|
||||||
|
for box in c e n ne nw s se sw w; do
|
||||||
|
touch common/terminal_box_$box.png
|
||||||
|
done
|
||||||
|
|
||||||
|
# Run the install script
|
||||||
bash ./install.sh \
|
bash ./install.sh \
|
||||||
--generate $out/grub/themes \
|
--generate $out/grub/themes \
|
||||||
--screen ${cfg.screen} \
|
--screen ${cfg.screen} \
|
||||||
@ -44,9 +52,11 @@
|
|||||||
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
||||||
${pkgs.imagemagick}/bin/magick ${splashImage} $out/grub/themes/${cfg.theme}/background.jpg;
|
${pkgs.imagemagick}/bin/magick ${splashImage} $out/grub/themes/${cfg.theme}/background.jpg;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ ${pkgs.lib.trivial.boolToString cfg.footer} == "false" ]; then
|
if [ ${pkgs.lib.trivial.boolToString cfg.footer} == "false" ]; then
|
||||||
sed -i ':again;$!N;$!b again; s/\+ image {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
|
sed -i ':again;$!N;$!b again; s/\+ image {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ ${pkgs.lib.trivial.boolToString hasBootMenuConfig} == "true" ]; then
|
if [ ${pkgs.lib.trivial.boolToString hasBootMenuConfig} == "true" ]; then
|
||||||
sed -i ':again;$!N;$!b again; s/\+ boot_menu {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
|
sed -i ':again;$!N;$!b again; s/\+ boot_menu {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
|
||||||
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
|
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
|
||||||
@ -55,6 +65,7 @@
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ ${pkgs.lib.trivial.boolToString hasTerminalConfig} == "true" ]; then
|
if [ ${pkgs.lib.trivial.boolToString hasTerminalConfig} == "true" ]; then
|
||||||
sed -i 's/^terminal-.*$//g' $out/grub/themes/${cfg.theme}/theme.txt
|
sed -i 's/^terminal-.*$//g' $out/grub/themes/${cfg.theme}/theme.txt
|
||||||
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
|
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user