Re: ConTeXt on NixOS

Bruce Horrocks <[email protected]> Wed, 15 Jul 2026 22:59:45 +0100
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>

> On 15 Jul 2026, at 00:08, Rik Kabel <[email protected]> wrote:
> 
> Hello all,
> Do any of you run ConTexT on NixOS? If so, do you use standalone, Texlive ConTeXt subset, full Texlive, or some other installation method.
> (My latest buiild tells me that the Texlive Context schema is being removed, and I want to prepare for that happening.)

There was a thread a while back raised by Gabriel Solis and I looked into creating a Nix package that would install Context. I wasn't able to produce a satisfactory solution because (a) my Nix fu wasn't good enough but also (b) there is a fundamental mismatch between the way Nix wants to work and the way Context works.

That mismatch is that Nix wants to install everything in hidden directories that it controls and that the user is actively prevented from changing (except via Nix). Context, on the other hand, lives in a directory named "context-<os_version>-<processor-type>" and you are encouraged to add your own packages, environment files and fonts into that directory tree.

Nix used to allow packages to leave a user-visible directory but, as of a couple of years ago, that became an admin level function so any putative "nix build context.nix" command would need to be run as 'sudo'. I don't want to do that as it shouldn't be necessary and users shouldn't be encouraged to use 'sudo' willy-nilly.

It is possible to produce a "nix shell context.nix" that builds and installs the latest LMTX and leaves the directory in the local directory, which might be a suitable half-way house for you? It does mean that your install won't be immutable and you lose all the Nix goodness, yadda, yadda.

Lastly the TeXlive people clearly have better Nix fu than I do as there is a TexLive package that includes Context.
<https://search.nixos.org/packages?channel=26.05&query=texlivePackages.texlive-en#show=texlivePackages.texlive-en>

This might be your path of least resistance if you can live with the Context version from the beginning of the year and the extra disk space needed for a full LaTeX as well.

Finally, there is nothing stopping you from using the standard Linux install under NixOS and installing by hand. The main gotcha, iirc, is that /bin/bash and some sort of unzip command is assumed to exist by Context so you need to tweak your NixOS (or Nix shell) to add them.

Regards,

--
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________