First you find a copy of Mathematica_13.2.1_LINUX.sh
or similar and find its sha256sum
.
Then you go to nixpkgs
and copy all Mathematica files to a local directory.
You need to modify default.nix
and wrap its contents into
let pkgs = import <nixpkgs> {};
in pkgs.callPackage (
# whatever is in default.nix
) {}
Next modify sha256 checksum and filename in version.nix
to match what you have above.
Run nix hash file Mathematica_13.2.1_BNDL_LINUX.sh
.
Finally, running nix-build
will install Mathematica to Nix store.
Hello! I am no longer running Nix (I'm back on Arch) so it will take me some time to test this. Unfortunately, it seems like every build of Mathematica is it's own beast so I will have to test with the latest one, 13.3.1.
Do you know if the error code you're getting, 127, has some message or description? I forgot what that code means :)