nix-matlab/matlab.nix

18 lines
420 B
Nix
Raw Normal View History

2021-05-14 13:02:26 +00:00
{ 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";
}