nix: refactor
This commit is contained in:
parent
bacb52ee1e
commit
aa66f3c880
1 changed files with 6 additions and 7 deletions
|
|
@ -72,24 +72,24 @@
|
||||||
pname = "beat-detector";
|
pname = "beat-detector";
|
||||||
version = "1.0";
|
version = "1.0";
|
||||||
|
|
||||||
src = ./..;
|
src = ./../assets/cpp;
|
||||||
|
|
||||||
nativeBuildInputs = [gcc];
|
nativeBuildInputs = [gcc];
|
||||||
buildInputs = [aubio pipewire];
|
buildInputs = [aubio pipewire];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mkdir -p bin
|
|
||||||
g++ -std=c++17 -Wall -Wextra \
|
g++ -std=c++17 -Wall -Wextra \
|
||||||
-I${pipewire.dev}/include/pipewire-0.3 \
|
-I${pipewire.dev}/include/pipewire-0.3 \
|
||||||
-I${pipewire.dev}/include/spa-0.2 \
|
-I${pipewire.dev}/include/spa-0.2 \
|
||||||
-I${aubio}/include/aubio \
|
-I${aubio}/include/aubio \
|
||||||
assets/cpp/beat-detector.cpp \
|
beat-detector.cpp \
|
||||||
-o bin/beat_detector \
|
-o beat_detector \
|
||||||
-lpipewire-0.3 -laubio
|
-lpipewire-0.3 -laubio
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm755 bin/beat_detector $out/bin/beat_detector
|
mkdir -p $out/bin
|
||||||
|
install -Dm755 beat_detector $out/bin/beat_detector
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
pname = "wayland-idle-inhibitor";
|
pname = "wayland-idle-inhibitor";
|
||||||
version = "1.0";
|
version = "1.0";
|
||||||
|
|
||||||
src = ./..;
|
src = ./../assets/cpp;
|
||||||
|
|
||||||
nativeBuildInputs = [gcc wayland-scanner wayland-protocols];
|
nativeBuildInputs = [gcc wayland-scanner wayland-protocols];
|
||||||
buildInputs = [wayland];
|
buildInputs = [wayland];
|
||||||
|
|
@ -105,7 +105,6 @@
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
wayland-scanner client-header < ${wayland-protocols}/share/wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml > idle-inhibitor.h
|
wayland-scanner client-header < ${wayland-protocols}/share/wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml > idle-inhibitor.h
|
||||||
wayland-scanner private-code < ${wayland-protocols}/share/wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml > idle-inhibitor.c
|
wayland-scanner private-code < ${wayland-protocols}/share/wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml > idle-inhibitor.c
|
||||||
cp assets/cpp/idle-inhibitor.cpp .
|
|
||||||
|
|
||||||
gcc -o idle-inhibitor.o -c idle-inhibitor.c
|
gcc -o idle-inhibitor.o -c idle-inhibitor.c
|
||||||
g++ -o inhibit_idle idle-inhibitor.cpp idle-inhibitor.o -lwayland-client
|
g++ -o inhibit_idle idle-inhibitor.cpp idle-inhibitor.o -lwayland-client
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue