-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathderivation.nix
67 lines (59 loc) · 1.16 KB
/
derivation.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ stdenv, pkgs, lib, fetchFromGitHub, reactor-cpp, ... }:
stdenv.mkDerivation {
name = "alarm-clock";
version = "0.0.1";
src = ./..;
depsBuildBuild = with pkgs; [
pkg-config
];
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
wayland-scanner
glslang
];
buildInputs = with pkgs; [
which
gcc
cmake
git
mujoco
jdk17_headless
freeglut
xorg.libX11
xorg.libXext
xorg.libXcursor
xorg.xrandr
xorg.libXrandr
xorg.libXinerama
xorg.libXi
#xorg.xinput
#xorg.xf86inputvmmouse
#libGL
libGLU
mesa
wayland
wayland-protocols
vulkan-loader
libxkbcommon
libdecor
glfw
glfw2
glfw-wayland
];
configurePhase = ''
echo "Test"
'';
buildPhase = ''
export LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib";
echo "Starting compiling"
mkdir -p include/reactor-cpp/
cp -r ${reactor-cpp}/include/reactor-cpp/* include/reactor-cpp/
${pkgs.lingua-franca}/bin/lfc --external-runtime-path ${reactor-cpp}/ ./src/MujocoSimulator.lf
'';
installPhase = ''
mkdir -p $out/bin
cp -r ./bin/* $out/bin
'';
}