-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoverlay.nix
46 lines (34 loc) · 1.19 KB
/
overlay.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
{ dylib, JustEnoughMod, ... }:
final: _: {
JustEnoughModCore = with final;
let libPath = [ vulkan-loader ];
in clangStdenv.mkDerivation {
inherit libPath;
name = "JustEnoughModCore";
meta.mainProgram = "JustEnoughMod";
src = ./.;
enableParallelBuilding = true;
nativeBuildInputs =
[ clang-tools_17 pkg-config meson ninja makeWrapper doxygen graphviz ];
buildInputs =
[ glfw-wayland wayland spdlog vulkan-headers vulkan-validation-layers ]
++ libPath;
preConfigure = ''
mkdir -p subprojects
chmod 777 -R subprojects
cp -r ${JustEnoughMod} subprojects/JustEnoughMod
chmod 777 -R subprojects
cp -r ${dylib} subprojects/JustEnoughMod/subprojects/dylib
chmod 777 -R subprojects
'';
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/bin/Plugins
cp subprojects/JustEnoughMod/JustEnoughMod $out/bin
cp subprojects/JustEnoughMod/libJustEnoughMod.so $out/bin
cp libJustEnoughModCore.so $out/bin/Plugins
wrapProgram $out/bin/JustEnoughMod \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libPath}
'';
};
}