This is a remainder for myself because I need to run Mathematica once a year. Often the version I use is different from nixpkgs.
First you find a copy of Mathematica_12.1.0_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 (