Lxtharia / minegrub-theme

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

Fixed nixos-rebuild error with minegrub. #42

Closed 0nyr closed 7 months ago

0nyr commented 1 year ago

I had a build error, after updating my flake.lock:

[root@nixos:/home/onyr/nixos-config]# nixos-rebuild build
building the system configuration...
warning: Git tree '/home/onyr/nixos-config' is dirty
warning: updating lock file '/home/onyr/nixos-config/flake.lock':
• Updated input 'minegrub-theme':
    'github:Lxtharia/minegrub-theme/46601b0b51ea35ee9f9410a3121e565100141ef1' (2023-09-27)
  → 'github:0nyr/minegrub-theme/1f2d8f1919747813fe40bca2a4b529025e3bd2eb' (2023-09-29)
warning: Git tree '/home/onyr/nixos-config' is dirty
error: builder for '/nix/store/8y22bjrb5qr3kc06jd8q4w172i6iqir1-minegrub-theme.drv' failed with exit code 1;
       last 10 log lines:
       > updateAutotoolsGnuConfigScriptsPhase
       > configuring
       > no configure script, doing nothing
       > building
       > Traceback (most recent call last):
       >   File "/build/source/minegrub/update_theme.py", line 134, in <module>
       >     update_background(bg_file)
       >   File "/build/source/minegrub/update_theme.py", line 104, in update_background
       >     list_background_files = [f for f in os.listdir(f"{themedir}/backgrounds/") if f[0] != '_']
       > FileNotFoundError: [Errno 2] No such file or directory: '/build/source/minegrub/backgrounds/'
       For full logs, run 'nix log /nix/store/8y22bjrb5qr3kc06jd8q4w172i6iqir1-minegrub-theme.drv'.
error: 1 dependencies of derivation '/nix/store/mxcjh6vln8jnplkxvppf7203ddmjk2hf-grub-config.xml.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rlm7pxnm91nv73cg3h8w6bvfcwj4dpv8-install-grub.sh.drv' failed to build
error: 1 dependencies of derivation '/nix/store/m10ng065qs84il69d38vxgz98f7pdpy9-nixos-system-nixos-23.11.20230927.8a86b98.drv' failed to build

[root@nixos:/home/onyr/nixos-config]# nix log /nix/store/8y22bjrb5qr3kc06jd8q4w172i6iqir1-minegrub-theme.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/8y22bjrb5qr3kc06jd8q4w172i6iqir1-minegrub-theme.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/rzf2fjnsqbx9cwm0ra9fgqk1g8q9kdw8-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Traceback (most recent call last):
  File "/build/source/minegrub/update_theme.py", line 134, in <module>
    update_background(bg_file)
  File "/build/source/minegrub/update_theme.py", line 104, in update_background
    list_background_files = [f for f in os.listdir(f"{themedir}/backgrounds/") if f[0] !=>
FileNotFoundError: [Errno 2] No such file or directory: '/build/source/minegrub/background

I fixed the flake.nix and tested it via a fork of the project. Now it works again.

Lxtharia commented 7 months ago

Hello, I haven't tested this but several things to note: