Hi Gabriel,

On Mon, 2025-08-18 at 13:55 +0000, gbsol...@gmail.com wrote:
> I am working on packaging ConTeXt for NixOS,

The scripts that I'm using to package ConTeXt for TeX Live might be
useful:

    https://github.com/gucci-on-fleek/context-packaging

Depending on what you're doing, you could just use those scripts as
inspiration or use the .zip files in the releases directly.

> Following the "Manual Compilation" instructions from the wiki, I
> installed the tree into OUTDIR/tex. And, since Nix expects binaries in
> OUTDIR/bin, I symlinked the executables from
> OUTDIR/tex/texmf-linux-64/bin/ to there.

You should be able to move the binaries directly to OUTDIR/bin, as long
as context.lua and mtxrun.lua are symlimks to the correct locations.

    
https://github.com/gucci-on-fleek/context-packaging/blob/master/files/README-BINARIES.md

You _might_ need to adjust texmfcnf.lua to use the correct paths; there
isn't very much documentation on how to do this, but here are a few
examples:

    
https://github.com/gucci-on-fleek/context-packaging/blob/master/files/texmfcnf.lua
    
https://github.com/debian-tex/texlive-nonbin/blob/master/texlive-base/debian/patches/debian-texmfcnf.lua
    https://github.com/contextgarden/context/blob/main/web2c/texlivecnf.lua
    https://github.com/contextgarden/context/blob/main/web2c/contextcnf.lua

> So far both context and mtxrun seem to work as expected. Do you see
> any risk of problems down the line with this installation? In
> particular, given that I manually changed SELFAUTOPATH (and nothing
> else),

You should be fine. Any path issues will usually lead to a

    mtxrun | unknown script 'context.lua' or 'mtx-context.lua'

error, so as long as rebuilding the format

    $ context --make

and compiling a test document both work without any errors, then
everything should be okay.

> and that the tree is being installed as read-only?

That shouldn't be a problem at all; I install ConTeXt as root and
compile documents as a regular user, so my installation is effectively
read-only.

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

maillist : ntg-context@ntg.nl / 
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
___________________________________________________________________________________

Reply via email to