nix-matlab/matlab.nix
2021-05-14 16:02:26 +03:00

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";
}