Lxtharia / minegrub-theme

A Grub Theme in the style of Minecraft!
MIT License
3.17k stars 37 forks source link

Error building in NixOS (file not found) #54

Open Dandandooo opened 3 months ago

Dandandooo commented 3 months ago

I've been trying to build the minegrub theme using the instructions on the readme (which has a typo btw, "minegrub" should be "minegrub-theme" in the flake.nix). Whenever I put the splash splash: "100% Flakes!" (or any other string), I get the following error:

[root@nixxie:/etc/nixos]# nixos-rebuild switch
building the system configuration...
error: builder for '/nix/store/y3fq5081yashw377h0mcs7cgxlxyfpy0-minegrub-theme.drv' failed with exit code 1;
       last 9 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/863c8c1dwsaspli6hrjkn31hps8wxiib-source
       > source root is source
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > no configure script, doing nothing
       > Running phase: buildPhase
       > ERROR: The file 100% Flakes! does not exist.
       For full logs, run 'nix log /nix/store/y3fq5081yashw377h0mcs7cgxlxyfpy0-minegrub-theme.drv'.
error: 1 dependencies of derivation '/nix/store/37676acmhsvq6vlz3bpkv9rg00wbc9lp-grub-config.xml.drv' failed to build
error: 1 dependencies of derivation '/nix/store/02809bi6jgvz5il1jwhry7kz5irmks5v-install-grub.sh.drv' failed to build
error: 1 dependencies of derivation '/nix/store/aky4cpwmdd1z257xjkdbr3lcjkgcdb9a-nixos-system-nixxie-24.05.20240422.1e1dc66.drv' failed to build

Then when I try to comment out the line with the splash, the following occurs:

[root@nixxie:/etc/nixos]# nixos-rebuild switch
building the system configuration...
error: builder for '/nix/store/ncqpcwlc7ani3d207sb690sfrczv5if8-minegrub-theme.drv' failed with exit code 1;
       last 9 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/863c8c1dwsaspli6hrjkn31hps8wxiib-source
       > source root is source
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > no configure script, doing nothing
       > Running phase: buildPhase
       > ERROR: The file deleting garbage... does not exist.
       For full logs, run 'nix log /nix/store/ncqpcwlc7ani3d207sb690sfrczv5if8-minegrub-theme.drv'.
error: 1 dependencies of derivation '/nix/store/2y97rzr329q9y6f3rwj60wnmpd09fs8f-grub-config.xml.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k2s8dnh2cps5aqpg62l7s05mydbhkbfg-install-grub.sh.drv' failed to build
error: 1 dependencies of derivation '/nix/store/lxz9amb9lzh3i2mjlvqi68aw3pnyayih-nixos-system-nixxie-24.05.20240422.1e1dc66.drv' failed to build

I am not very knowledgable on NixOS, so if I'm doing anything wrong, please tell me.

andrewyazura commented 2 months ago

Same for me, happened after I updated my system flake:

$ sudo nix flake update
warning: updating lock file '/home/andrew/nixos/flake.lock':
• Updated input 'home-manager':
    'github:nix-community/home-manager/1c2acec99933f9835cc7ad47e35303de92d923a4' (2024-03-20)
  → 'github:nix-community/home-manager/0c5704eceefcb7bb238a958f532a86e3b59d76db' (2024-04-25)
• Updated input 'minegrub':
    'github:Lxtharia/minegrub-theme/ef835b35115ff70b9a1be02a89660bf8b60b721a' (2023-10-03)
  → 'github:Lxtharia/minegrub-theme/08fe7f2b07e0f39426d53e1a1ab5b071e77b9e39' (2024-04-21)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b06025f1533a1e07b6db3e75151caa155d1c7eb3' (2024-03-19)
  → 'github:NixOS/nixpkgs/7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856' (2024-04-25)

The error message I get:

error: builder for '/nix/store/vci1bdm0cizjw8gfv8jbhb6dav4ygpng-minegrub-theme.drv' failed with exit code 1;
       last 9 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/863c8c1dwsaspli6hrjkn31hps8wxiib-source
       > source root is source
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > no configure script, doing nothing
       > Running phase: buildPhase
       > ERROR: The file 100% Flakes! does not exist.
       For full logs, run 'nix log /nix/store/vci1bdm0cizjw8gfv8jbhb6dav4ygpng-minegrub-theme.drv'.
error: 1 dependencies of derivation '/nix/store/hmij1v0l5d8hpx0hf0923may5lvysp2k-grub-config.xml.drv' failed to build
error: 1 dependencies of derivation '/nix/store/r4fxjb3bihqq41cszgvc0dzbz782hncw-install-grub.sh.drv' failed to build

Full log from nix log:

$ nix log /nix/store/vci1bdm0cizjw8gfv8jbhb6dav4ygpng-minegrub-theme.drv
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/863c8c1dwsaspli6hrjkn31hps8wxiib-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
ERROR: The file 100% Flakes! does not exist.

If there is anything else I can provide, I'd be happy to do so. I really enjoy this grub theme, and don't like the idea of removing it from my setup

andrewyazura commented 2 months ago

For now, the only solution I see is not updating the minegrub input in my flake:

$ sudo nix flake lock --update-input home-manager
$ sudo nix flake lock --update-input nixpkgs
warning: updating lock file '/home/andrew/nixos/flake.lock':
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b06025f1533a1e07b6db3e75151caa155d1c7eb3' (2024-03-19)
  → 'github:NixOS/nixpkgs/7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856' (2024-04-25)

This doesn't break the minegrub for me, so if you're using flake, this is a viable workaround for now.

ludverse commented 1 month ago

seems like the problem here is that in commit 636190d we changed the buildPhase to pass the slogan as the first argument to update_theme.py instead of writing the slogan to resources/splashes.txt. Thats all and well, and imo a better way of doing it than overwriting all default splashes in splashes.txt. The problem occurs at a later time when in some commit the code in update_theme.py has been refactored and now takes the background image path as the first argument and instead the slogan as the second argument.

i see two solutions: switch the arguments around in the update_theme.py, but I don't know how well that will play with other parts of this repo. Or: require a background-image property be passed to boot.loader.minegrub when passing a slogan, that can then be passed as the first argument to update_theme.py, but it feels janky ngl...