Variable name issue

I am trying to add an extension to my home-manager Firefox configuration from the following file:

https://github.com/nix-community/nur-combined/blob/7c10bdc8e7f9519e5628121f1f43eac7607c6652/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix

Coincidentally it happens to be the first one, 10ten-ja-reader. However, I get the following error:

error: undefined variable 'ten-ja-reader’

which is ignoring the “10” at the start of the variable. I assume this might be an invalid variable name starting with a number, but in that case what should I do to to make this build the system configuration properly? Am I going to have to manually call buildFirefoxXpiAddon in my config, assigned to a different name? Or is there a simpler solution? The other Firefox extensions specified in my list work without problems. Thanks

You’re going to have to clarify how you’re importing this file and accessing it, as that’s the crux of the issue here.

It might be as simple as using foo."bar" syntax instead of foo.bar.

Hi, this is the relevant section of the config:

{ pkgs, ... }:

{
  programs.firefox = {
    enable = true;
    extensions = with pkgs.nur.repos.rycee.firefox-addons; [
      noscript
      ublock-origin
      privacy-badger
      decentraleyes
      tridactyl
      libredirect
      10ten-ja-reader
    ];

Just don’t depend on with. It doesn’t work with attribute names that aren’t valid variable names. Replace 10ten-ja-reader with pkgs.nur.repos.rycee.firefox-addons."10ten-ja-reader" in the list and it should work.

That worked, thanks.