input-remapper: Rename from key-mapper

This commit is contained in:
2022-02-02 15:55:38 +01:00
parent e80232bb39
commit c0b061a79d
15 changed files with 187 additions and 61 deletions

View File

@@ -0,0 +1,62 @@
{ stdenv, lib,
pkgconfig, cmake, ffmpeg, libdrm, libpulseaudio, xorg,
libcap, wayland, libopus, boost, openssl, libevdev, mesa,
fetchgit
}:
stdenv.mkDerivation rec {
pname = "sunehine";
version = "0.10.1";
src = fetchgit {
url = "https://github.com/loki-47-6F-64/sunshine.git";
rev = "v${version}";
sha256 = "1aw8bis5v7rb3ixl378gqm34rx3sja7pp5g6kjd9b0yvl1bgxai6";
deepClone = true;
};
nativeBuildInputs = [
pkgconfig cmake
];
buildInputs = [
wayland # Wayland
libdrm libcap # KMS
xorg.libxcb xorg.libX11 xorg.libXtst xorg.libXrandr xorg.libXfixes libevdev # X11
libopus libpulseaudio boost ffmpeg openssl # Common
];
propagatedBuildInputs = [ mesa ];
cmakeFlags = [
"-DSUNSHINE_ENABLE_X11=off"
"-DSUNSHINE_ENABLE_CUDA=off"
"-DCMAKE_BUILD_TYPE=Release"
];
NIX_CFLAGS_COMPILE = "-Wformat";
patches = [ ./fuck.patch ];
preConfigure = ''
# Fix hardcoded path to libevdev
sed \
-e "s|/usr/include/libevdev-1.0|${libevdev}/include/libevdev-1.0|" \
-e "s|@@SUNSHINE_ASSETS_DIR@@|$out/share/sunshine|" \
--in-place CMakeLists.txt
'';
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/sunshine/
cp -r ../assets $out/share/sunshine/assets
mv sunshine $out/bin/sunshine
'';
meta = with lib; {
description = "Host for Moonlight Streaming Client ";
homepage = "https://github.com/loki-47-6F-64/sunshine";
license = licenses.gpl3;
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45d4bf7..bd8c638 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -241,9 +241,7 @@ else()
list(APPEND SUNSHINE_COMPILE_OPTIONS -O3)
endif()
-if(NOT SUNSHINE_ASSETS_DIR)
- set(SUNSHINE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/assets")
-endif()
+set(SUNSHINE_ASSETS_DIR "@@SUNSHINE_ASSETS_DIR@@/assets")
if(NOT SUNSHINE_CONFIG_DIR)
set(SUNSHINE_CONFIG_DIR "${SUNSHINE_ASSETS_DIR}")