mirror of
https://git.adityakumar.xyz/nix-matlab.git
synced 2024-11-12 17:29:44 +00:00
18 lines
420 B
Nix
18 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";
|
||
|
}
|