LatexIndent perl module now missing in nixpkgs?

I’m on unstable, and am able to compile and run a particular perl routine (LatexIndent) without difficulty in nix-shell:

$ nix-shell -p perl536Packages.LatexIndent
$ which latexindent.pl
/nix/store/ll7yh4z3z4n6mnsfx4zqxfz81vcqz9x5-perl5.36.0-latexindent.pl-3.21/bin/latexindent.pl
$ latexindent.pl -v
3.21, 2023-05-01

Alternatively, incorporating other miscellaneous perl modules or routines in configuration.nix also works, using

  environment.systemPackages = with pkgs; [
    (perl.withPackages(ps: [ ps.LaTeXML ps.Later]))
  ...
  ];

(here I chose two perl modules in https://github.com/NixOS/nixpkgs/blob/08700de174bc6235043cb4263b643b721d936bdb/pkgs/top-level/perl-packages.nix that are listed adjacent to LatexIndent, just to check that I had the nix syntax correct:

$ sudo nixos-rebuild switch
building the system configuration...
updating GRUB 2 menu...
stopping the following units: accounts-daemon.service
activating the configuration...
perl: +185.7 KiB
perl5.36.0-Archive-Zip: βˆ… β†’ 1.68, +219.4 KiB
perl5.36.0-Canary-Stability: βˆ… β†’ 2013, +9.9 KiB
perl5.36.0-DB_File: βˆ… β†’ 1.855, +126.7 KiB
perl5.36.0-Image-Magick: βˆ… β†’ 7.1.0-0, +411.7 KiB
perl5.36.0-Image-Size: βˆ… β†’ 3.300, +57.2 KiB
perl5.36.0-JSON-XS: βˆ… β†’ 4.03, +152.4 KiB
perl5.36.0-LaTeXML: βˆ… β†’ 0.8.7, +8849.2 KiB
perl5.36.0-Object-Realize-Later: βˆ… β†’ 0.21, +21.1 KiB
perl5.36.0-SUPER: βˆ… β†’ 1.20190531, +9.3 KiB
perl5.36.0-Test-MockModule: βˆ… β†’ 0.175.0, +16.3 KiB
perl5.36.0-Text-Unidecode: βˆ… β†’ 1.30, +501.6 KiB
perl5.36.0-Types-Serialiser: βˆ… β†’ 1.01, +13.5 KiB
perl5.36.0-common-sense: βˆ… β†’ 3.75, +19.5 KiB
system: +43.8 KiB
setting up /etc...
reloading user units for biggie ...
setting up tmpfiles
reloading the following units: dbus.service
restarting the following units: polkit.service
starting the following units: accounts-daemon.service

So far so good. However, Amending the list to include LatexIndent,

 environment.systemPackages = with pkgs; [
    (perl.withPackages(ps: [ ps.LaTeXML ps.LatexIndent ps.Later]))
 ...
];

now produces a missing attribute error:

$ sudo nixos-rebuild switch
<snip>
       error: attribute 'LatexIndent' missing
       at /nix/store/5aqj9jjn5yq8klikw6a9i7mjh3vsphm4-source/configuration.nix:186:41:

          185|   environment.systemPackages = with pkgs; [
          186|     (perl.withPackages(ps: [ ps.LaTeXML ps.LatexIndent ps.Later]))

I’ve run nixos-rebuild with --show-trace, and the source file referenced in the output (/nix/store/p1p2fx28c9ayy77igq1msgv6rhw5hklz-source/pkgs/top-level/perl-packages.nix) is definitely missing LatexIndent, which is apparently still available to nix-shell via the unstable channel. Has this package been dropped?

1 Like

The solution to this was to delete /etc/nixos/flake.lock, which forced the system to download from cache.nixos.org and rebuild everything. That worked to resolve the β€œmissing” package.

1 Like

You didn’t have to delete that file, just nix flake update would have been sufficient

1 Like