danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
902 stars 105 forks source link

Support for Nix 24.05? #405

Closed davegallant closed 2 weeks ago

davegallant commented 1 month ago

Recently attempted to upgrade from 23.11 to 24.05 and hit this:

trace: Error (base16.nix): A scheme does not follow base16 format or was incorrectly parsed.
Please consult https://github.com/SenchoPens/base16.nix/tree/main#%EF%B8%8F-troubleshooting
trace: Warning (base16.nix): failed to parse YAML file without an IFD.
trace: Error (base16.nix): A scheme does not follow base16 format or was incorrectly parsed.
Please consult https://github.com/SenchoPens/base16.nix/tree/main#%EF%B8%8F-troubleshooting
error:
       … while calling the 'seq' builtin

         at /nix/store/pakwxp8v573nj1n5yj8sig3pnngkfa21-source/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       … while evaluating a branch condition

         at /nix/store/pakwxp8v573nj1n5yj8sig3pnngkfa21-source/lib/modules.nix:261:9:

          260|       checkUnmatched =
          261|         if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
             |         ^
          262|           let

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Error (base16.nix): Processing the input argument of the `mkSchemeAttrs` failed.
       Please consult https://github.com/SenchoPens/base16.nix/tree/main#%EF%B8%8F-troubleshooting

I don't run into this issue when omitting stylix.base16Scheme.

danth commented 1 month ago

What setting did you provide for stylix.base16Scheme?

davegallant commented 1 month ago

What setting did you provide for stylix.base16Scheme?

stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
cdombroski commented 1 month ago

Similar here, the repo where the schemes are pulled from has changed Compare the schema for 23.11: https://github.com/tinted-theming/base16-schemes/blob/main/solarflare.yaml to the one for 24.05: https://github.com/tinted-theming/schemes/blob/spec-0.11/base16/solarflare.yaml

arunoruto commented 1 month ago

What setting did you provide for stylix.base16Scheme?

stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";

Can you try to download the theme from the new repo and link ti locally? If that works, it is just a matter of having the scheme point to the correct file in the package.

danth commented 1 month ago

It looks like we need to update the base16.nix library to support the new schema.

https://github.com/SenchoPens/base16.nix/commit/b390e87cd404e65ab4d786666351f1292e89162ax

Edit: This version is already in use in the latest Stylix. Are you using the master branch?

davegallant commented 1 month ago

It looks like we need to update the base16.nix library to support the new schema.

SenchoPens/base16.nix@b390e87cd404e65ab4d786666351f1292e89162ax

Edit: This version is already in use in the latest Stylix. Are you using the master branch?

I believe this is user error when migrating to 24.05. I ran a nix flake update and

• Updated input 'stylix/base16':
    'github:SenchoPens/base16.nix/dddf2e1c04845d43c89a8e9e37d574519649a404' (2023-07-17)
  → 'github:SenchoPens/base16.nix/665b3c6748534eb766c777298721cece9453fdae' (2024-02-25)

It seems to build again. Sorry for the noise.

arunoruto commented 2 weeks ago

I guess the issue can be closed since a branch for 24.05 has been opened.