NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.37k stars 14.33k forks source link

Migration to nerd-fonts fail #359731

Closed khsoh closed 2 days ago

khsoh commented 2 days ago

Describe the bug

The new commit: https://github.com/NixOS/nixpkgs/commit/de4dbc58fdeb84694d47d6c3f7b9f04a57cc4231 caused a problem with my nix-darwin configuration.nix file that had the following code:

  fonts.packages = with pkgs;
  [
    (nerdfonts.override { fonts = [ "FiraMono" ]; })
  ];

Building with darwin-rebuild switch reports the following error:

error: nerdfonts has been separated into individual font packages under the namespace nerd-fonts

I tried replacing nerdfonts with nerd-fonts. That did not work - the error was:

error: function 'anonymous lambda' called with unexpected argument 'fonts'

Steps To Reproduce

See description

Expected behavior

darwin-rebuild switch should work.

Screenshots

none

Additional context

Running on macOS 15.1.1 (24B91)

Metadata

Notify maintainers


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

khsoh commented 2 days ago

Found the fix:

fonts.packages = with pkgs;
  [
    nerd-fonts.fira-mono
  ];

I think this change in specification should be mentioned in the release notes.

StanislausA commented 1 day ago

Found the fix:

fonts.packages = with pkgs;
  [
    nerd-fonts.fira-mono
  ];

I think this change in specification should be mentioned in the release notes.

some added direction fer da dawgs dem: font name changes --> pkgs/data/fonts/nerd-fonts/manifests/fonts.json

ie.

fonts.packages = [
    # from: (pkgs.nerd-fonts.override { fonts = [ "JetBrainsMono" ]; })
    # to: pkgs.nerd-fonts.jetbrains-mono
];