-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.nix
More file actions
61 lines (61 loc) · 1.17 KB
/
ui.nix
File metadata and controls
61 lines (61 loc) · 1.17 KB
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
{
cmake,
engine,
glfw,
llvm,
lib,
libdecor,
libGL,
libx11,
libxcursor,
libxinerama,
libxi,
libxrandr,
ninja,
pkg-config,
raylib,
stdenv,
wayland,
}:
stdenv.mkDerivation rec {
pname = "smart-piano-ui";
version = "1.0.0";
src = lib.cleanSource ./.;
nativeBuildInputs = [
# clang # C/C++ compiler
cmake # Modern build tool
llvm # For llvm-cov
ninja # Modern build tool
pkg-config # Build tool
];
buildInputs = [
engine # SmartPianoEngine
glfw # Raylib dependency
raylib # Graphics library
]
++ lib.optionals stdenv.isLinux [
wayland
libGL # GPU library (null in nixpkgs on Darwin)
libdecor
libx11
libxcursor
libxinerama
libxi
libxrandr
];
preConfigure = ''
cmakeFlagsArray+=("-DENGINE_PATH=${engine}" "-DCOVERAGE=OFF")
'';
installPhase = ''
runHook preInstall
mkdir --parents --verbose $out/bin
cp --verbose src/main $out/bin/${pname}
cp --verbose ${engine}/bin/engine $out/bin/engine
runHook postInstall
'';
meta = with lib; {
description = "Smart Piano User Interface";
license = licenses.gpl3Plus;
platforms = platforms.all;
};
}