-
-
Save konfou/7f0cec75ae2abde80eb8a94de5788881 to your computer and use it in GitHub Desktop.
Compile Wolfram Engine Backend for TeXmacs on Linux (Nix)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 1. Installation location of the Wolfram Engine | |
WOLFRAMROOT=$(nix-env -q wolfram-engine --out-path --no-name) | |
# 2. MathLink path. Consider saving it for reasons in 4. | |
MLINKROOT=$WOLFRAMROOT/libexec/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions | |
# 3. Compile | |
TEXMACSROOT=$(nix-env -q TeXmacs --out-path --no-name) | |
gcc -m64 -o ~/.TeXmacs/bin/tm_mathematica.bin \ | |
$TEXMACSROOT/share/TeXmacs/plugins/mathematica/src.lazy/tm_mathematica.c \ | |
-I $MLINKROOT -L $MLINKROOT -lML64i4 -lrt -lm -lpthread -lstdc++ -ldl -luuid | |
# 4. To get it to work we should additionally specify the following at TeXmacs launch time: | |
export LD_LIBRARY_PATH=$MLINKROOT | |
# 5. Launch. | |
texmacs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment