mirror of
https://git.adityakumar.xyz/nix-matlab.git
synced 2024-11-08 23:59:45 +00:00
17 lines
420 B
Nix
17 lines
420 B
Nix
{ common, writeScriptBin, buildFHSUserEnv }:
|
|
|
|
let
|
|
matlab-wrapped = with common;
|
|
writeScriptBin "matlab" ''
|
|
#!/bin/sh
|
|
export MATLAB_JAVA=/usr/lib/openjdk
|
|
export QT_QPA_PLATFORM=xcb
|
|
exec ${runPath}/bin/matlab "$@"
|
|
'';
|
|
in buildFHSUserEnv {
|
|
name = "matlab";
|
|
|
|
targetPkgs = pkgs: with pkgs; (common.targetPkgs pkgs) ++ [ matlab-wrapped ];
|
|
|
|
runScript = "${matlab-wrapped}/bin/matlab";
|
|
}
|