Install Matlab using Nix imperatively
Find a file
2021-05-15 11:30:34 +03:00
icons/hicolor Add icons and a desktop item 2021-05-15 11:30:34 +03:00
.gitignore Introduce a flake, modern setup 2021-05-14 17:27:40 +03:00
common.nix Introduce a flake, modern setup 2021-05-14 17:27:40 +03:00
default.nix Introduce a flake, modern setup 2021-05-14 17:27:40 +03:00
flake.lock Introduce a flake, modern setup 2021-05-14 17:27:40 +03:00
flake.nix Add icons and a desktop item 2021-05-15 11:30:34 +03:00
install.adoc Use an imperative installation directory 2021-05-15 10:42:25 +03:00
README.adoc Add icons and a desktop item 2021-05-15 11:30:34 +03:00

= Matlab for Nix users

This repo is a collection of files that should help Nix and NixOS users install Matlab imperatively.

== Install

Like any other Matlab user, you should first go to your Matlab account on
Mathworks' website, at: https://www.mathworks.com/mwaccount/ and download the
installation zip file. Extract the zip file and note the `install` executable
you just extracted. To run that file, you'll need to get into a FHS environment
that a nix-shell will provide.

=== Run `matlab-shell` with an unstable Nix

....
nix run gitlab:doronbehar/nix-matlab#matlab-shell
....

=== Run `matlab-shell` with +++<s>stable</s>+++ legacy Nix

....
git clone https://gitlab.com/doronbehar/nix-matlab
cd nix-matlab
nix-shell
....

=== Installation of Matlab itself

include::./install.adoc[]

=== Adding `matlab` executables to your system

With what was done now, you run Matlab from the command line with:

....
# Legacy nix users (inside a clone of this repo)
$(nix-build)/bin/matlab
# Flake nix users (without cloning)
nix run gitlab:doronbehar/nix-matlab
....

But it's likely you'd like to make Matlab survive garbage collections and add a
desktop launcher to your system. To do that you can follow one of the following
paths according to your setup.

==== For NixOS users with a flakes setup



==== For NixOS users without a flakes setup

==== Home Manager setup

== Previous work

Core parts of this repo are based on
https://github.com/tviti/nix-cfg/tree/e6531426e86273e450c6133a0deae9008411fffd/pkgs/matlab[@tviti's
work]. My part was making it a bit more accessible for modern Nix flake setup,
and making the shell and steps a bit more approachable.