mirror of
https://git.adityakumar.xyz/nix-matlab.git
synced 2024-11-08 15:49:44 +00:00
Add all files from tviti's repo
This commit is contained in:
commit
a476a83bc7
4 changed files with 100 additions and 0 deletions
65
common.nix
Normal file
65
common.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
/* This list of dependencies is based on the official Mathworks dockerfile for
|
||||
R2020a, available at
|
||||
https://github.com/mathworks-ref-arch/container-images
|
||||
*/
|
||||
|
||||
{ }:
|
||||
|
||||
rec {
|
||||
runPath = "$HOME/downloads/software/matlab/installation";
|
||||
targetPkgs = pkgs:
|
||||
with pkgs;
|
||||
[
|
||||
cacert
|
||||
alsaLib # libasound2
|
||||
atk
|
||||
glib
|
||||
glibc
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
fontconfig
|
||||
gdk-pixbuf
|
||||
#gst-plugins-base
|
||||
# gstreamer
|
||||
gtk3
|
||||
nspr
|
||||
nss
|
||||
pam
|
||||
pango
|
||||
python27
|
||||
python36
|
||||
python37
|
||||
libselinux
|
||||
libsndfile
|
||||
glibcLocales
|
||||
procps
|
||||
unzip
|
||||
zlib
|
||||
|
||||
gcc
|
||||
gfortran
|
||||
|
||||
# nixos specific
|
||||
udev
|
||||
jre
|
||||
ncurses # Needed for CLI
|
||||
] ++ (with xorg; [
|
||||
libSM
|
||||
libX11
|
||||
libxcb
|
||||
libXcomposite
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXft
|
||||
libXi
|
||||
libXinerama
|
||||
libXrandr
|
||||
libXrender
|
||||
libXt
|
||||
libXtst
|
||||
libXxf86vm
|
||||
]);
|
||||
}
|
9
default.nix
Normal file
9
default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ callPackage }:
|
||||
|
||||
# TODO: Be explicit about versions in file and object names!
|
||||
let
|
||||
common = import ./common.nix { };
|
||||
in {
|
||||
matlab = callPackage ./matlab.nix { inherit common; };
|
||||
mlint = callPackage ./mlint.nix { inherit common; };
|
||||
}
|
17
matlab.nix
Normal file
17
matlab.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ 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";
|
||||
}
|
9
mlint.nix
Normal file
9
mlint.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ common, buildFHSUserEnv }:
|
||||
|
||||
buildFHSUserEnv {
|
||||
name = "mlint";
|
||||
|
||||
inherit (common) targetPkgs;
|
||||
|
||||
runScript = with common; "${runPath}/bin/glnxa64/mlint";
|
||||
}
|
Loading…
Reference in a new issue