Skip to content

Instantly share code, notes, and snippets.

@kinnala
Last active April 6, 2024 18:38
Show Gist options
  • Select an option

  • Save kinnala/b45c0ce0b2670be6cdaffb9b6e9ec6f3 to your computer and use it in GitHub Desktop.

Select an option

Save kinnala/b45c0ce0b2670be6cdaffb9b6e9ec6f3 to your computer and use it in GitHub Desktop.

Revisions

  1. kinnala revised this gist Nov 29, 2021. 1 changed file with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,16 @@
    This is a remainder for myself because I need once a year run Mathematica.
    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.
    Then you go to (nixpkgs)[https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/science/math/mathematica]
    and copy those files to a local directory.
    First you find a copy of `Mathematica_12.1.0_LINUX.sh` or similar and find its `sha256sum`.
    Then you go to [nixpkgs](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/science/math/mathematica)
    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
    ) {}
    ```
    Finally, running `nix-build default.nix` will install it.
    Next modify sha256 checksum and filename in `l10n.nix` to match what you have above.
    Run `nix-store --add-fixed sha256 Mathematica_12.1.0_LINUX.sh`.
    Finally, running `nix-build default.nix` will install Mathematica to Nix store.
  2. kinnala created this gist Nov 29, 2021.
    13 changes: 13 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    This is a remainder for myself because I need once a year run Mathematica.

    First you find a copy of `Mathematica_12.1.0_LINUX.sh` or similar.
    Then you go to (nixpkgs)[https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/science/math/mathematica]
    and copy those 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
    ) {}
    ```
    Finally, running `nix-build default.nix` will install it.