Where's Emacs packages' Nix expressions located?

I’m currently trying to install the Emacs package AUCTeX[0] by adding epkgs.auctex to home.programs.emacs.extraPackages = epkgs: [ ]; in my ~/.config/nixpkgs/home.nix file. But when I run nix-channel --update && home-manager switch I get

unpacking channels...
these derivations will be built:
  /nix/store/gncy9prfphsky7q6h26x8v91b20fp9g9-auctex-13.0.4.tar.drv
  /nix/store/63jqd881242fchk613s57and2iqpzglx-emacs-auctex-13.0.4.drv
  /nix/store/ibsc955nn5sjqfydchs9lvs6z509dmrx-emacs-packages-deps.drv
  /nix/store/pg62y5q63ngqvi8zvdphilg76wpp872v-emacs-with-packages-27.1.drv
  /nix/store/f8fdyfd33xvq4ylzb71skv9amn13gmyi-home-manager-path.drv
  /nix/store/agqdzhggmv9w9r8523m36lbh5fjn2j40-activation-script.drv
  /nix/store/jnfhjmv5i5fk4br476hikrb7120aabrr-home-manager-generation.drv
building '/nix/store/gncy9prfphsky7q6h26x8v91b20fp9g9-auctex-13.0.4.tar.drv'...

trying https://elpa.gnu.org/packages/auctex-13.0.4.tar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
error: cannot download auctex-13.0.4.tar from any mirror
builder for '/nix/store/gncy9prfphsky7q6h26x8v91b20fp9g9-auctex-13.0.4.tar.drv' failed with exit code 1
cannot build derivation '/nix/store/63jqd881242fchk613s57and2iqpzglx-emacs-auctex-13.0.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pg62y5q63ngqvi8zvdphilg76wpp872v-emacs-with-packages-27.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/f8fdyfd33xvq4ylzb71skv9amn13gmyi-home-manager-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/jnfhjmv5i5fk4br476hikrb7120aabrr-home-manager-generation.drv': 1 dependencies couldn't be built
error: build of '/nix/store/jnfhjmv5i5fk4br476hikrb7120aabrr-home-manager-generation.drv' failed

AUCTeX 13.0.5 was released 2021-03-21 and is available via ELPA.[1] When you try to access the tar file for version 13.0.4, as Nix tries to do, you get a HTTP 404-error.[2]

So I want to learn where I can find the AUCTeX Nix expression that’s used for installing packages when you add it to the home.programs.emacs.extraPackages list, and submit a PR for updating it.

I found AUCTeX in Nixpkgs[3], but according to @Sandro that expression isn’t used (and it’s horrible out of date) when installing the package the way I do it.

[0] AUCTeX - Sophisticated document creation
[1] GNU ELPA - auctex
[2] https://elpa.gnu.org/packages/auctex-13.0.4.tar
[3] nixpkgs/default.nix at d600f006643e074c2ef1d72e462e218b647a096c · NixOS/nixpkgs · GitHub

AUCTeX is an Emacs package.
The Emacs modes live inside pkgs/applications/editors/emacs-modes and are updated by running the scripts update-elpa,update-melpa,update-org .

Don’t worry, I have updated them yesterday:

https://github.com/NixOS/nixpkgs/pull/117764

Now the problem is waiting Hydra do the update job! Follow the progress here:

https://nixpk.gs/pr-tracker.html?pr=117764

1 Like