Loading pkgs/servers/sunshine/default.nix +3 −9 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ , callPackage , fetchFromGitHub , fetchurl , fetchpatch , autoPatchelfHook , makeWrapper , buildNpmPackage Loading Loading @@ -44,31 +43,26 @@ let in stdenv.mkDerivation rec { pname = "sunshine"; version = "0.19.1"; version = "0.20.0"; src = fetchFromGitHub { owner = "LizardByte"; repo = "Sunshine"; rev = "v${version}"; sha256 = "sha256-fifwctVrSkAcMK8juAirIbIP64H7GKEwC+sUR/U6Q3Y="; sha256 = "sha256-/ceN44PAEtXzrAUi4AEldW1FBhJqIXah1Zd0S6fiV3s="; fetchSubmodules = true; }; # remove pre-built ffmpeg; use ffmpeg from nixpkgs patches = [ ./ffmpeg.diff # fix for X11 not being added to libraries unless prebuilt FFmpeg is used: https://github.com/LizardByte/Sunshine/pull/1166 (fetchpatch { url = "https://github.com/LizardByte/Sunshine/commit/a067da6cae72cf36f76acc06fcf1e814032af886.patch"; sha256 = "sha256-HMxM7luiFBEmFkvQtkdAMMSjAaYPEFX3LL0T/ActUhM="; }) ]; # fetch node_modules needed for webui ui = buildNpmPackage { inherit src version; pname = "sunshine-ui"; npmDepsHash = "sha256-sdwvM/Irejo8DgMHJWWCxwOykOK9foqLFFd/tuzrkxI="; npmDepsHash = "sha256-pwmkpZjDwluKJjcY0ehetQbAlFnj1tsW100gRjolboc="; dontNpmBuild = true; Loading pkgs/servers/sunshine/ffmpeg.diff +14 −12 Original line number Diff line number Diff line diff --git a/CMakeLists.txt b/CMakeLists.txt index 1842c67..8afd0e9 100644 index ccca6fc..8789a4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,8 @@ else() @@ -349,6 +349,8 @@ else() set(WAYLAND_FOUND OFF) endif() Loading @@ -10,10 +10,10 @@ index 1842c67..8afd0e9 100644 + if(X11_FOUND) add_compile_definitions(SUNSHINE_BUILD_X11) include_directories(${X11_INCLUDE_DIR}) @@ -451,51 +453,12 @@ set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic) set_source_files_properties(third-party/nanors/rs.c PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize") include_directories(SYSTEM ${X11_INCLUDE_DIR}) @@ -547,43 +549,7 @@ set_source_files_properties(third-party/nanors/rs.c list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY}) -# Pre-compiled binaries -if(WIN32) Loading @@ -26,7 +26,7 @@ index 1842c67..8afd0e9 100644 - set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64") - endif() -else() - set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11) set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11) - if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64") - else() Loading @@ -52,10 +52,10 @@ index 1842c67..8afd0e9 100644 - ${FFMPEG_PREPARED_BINARIES}/lib/libx265.a - ${HDR10_PLUS_LIBRARY} - ${FFMPEG_PLATFORM_LIBRARIES}) - include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/third-party include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -593,7 +559,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include ${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors ${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors/deps/obl Loading @@ -63,11 +63,13 @@ index 1842c67..8afd0e9 100644 ${PLATFORM_INCLUDE_DIRS} ) @@ -529,6 +492,7 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES @@ -627,7 +592,9 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} enet opus + cbs ${FFMPEG_LIBRARIES} + ${FFMPEG_PLATFORM_LIBRARIES} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} pkgs/servers/sunshine/package-lock.json +3 −3 Original line number Diff line number Diff line Loading @@ -20,9 +20,9 @@ } }, "node_modules/@popperjs/core": { "version": "2.11.7", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz", "integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==", "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "peer": true, "funding": { "type": "opencollective", Loading Loading
pkgs/servers/sunshine/default.nix +3 −9 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ , callPackage , fetchFromGitHub , fetchurl , fetchpatch , autoPatchelfHook , makeWrapper , buildNpmPackage Loading Loading @@ -44,31 +43,26 @@ let in stdenv.mkDerivation rec { pname = "sunshine"; version = "0.19.1"; version = "0.20.0"; src = fetchFromGitHub { owner = "LizardByte"; repo = "Sunshine"; rev = "v${version}"; sha256 = "sha256-fifwctVrSkAcMK8juAirIbIP64H7GKEwC+sUR/U6Q3Y="; sha256 = "sha256-/ceN44PAEtXzrAUi4AEldW1FBhJqIXah1Zd0S6fiV3s="; fetchSubmodules = true; }; # remove pre-built ffmpeg; use ffmpeg from nixpkgs patches = [ ./ffmpeg.diff # fix for X11 not being added to libraries unless prebuilt FFmpeg is used: https://github.com/LizardByte/Sunshine/pull/1166 (fetchpatch { url = "https://github.com/LizardByte/Sunshine/commit/a067da6cae72cf36f76acc06fcf1e814032af886.patch"; sha256 = "sha256-HMxM7luiFBEmFkvQtkdAMMSjAaYPEFX3LL0T/ActUhM="; }) ]; # fetch node_modules needed for webui ui = buildNpmPackage { inherit src version; pname = "sunshine-ui"; npmDepsHash = "sha256-sdwvM/Irejo8DgMHJWWCxwOykOK9foqLFFd/tuzrkxI="; npmDepsHash = "sha256-pwmkpZjDwluKJjcY0ehetQbAlFnj1tsW100gRjolboc="; dontNpmBuild = true; Loading
pkgs/servers/sunshine/ffmpeg.diff +14 −12 Original line number Diff line number Diff line diff --git a/CMakeLists.txt b/CMakeLists.txt index 1842c67..8afd0e9 100644 index ccca6fc..8789a4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,8 @@ else() @@ -349,6 +349,8 @@ else() set(WAYLAND_FOUND OFF) endif() Loading @@ -10,10 +10,10 @@ index 1842c67..8afd0e9 100644 + if(X11_FOUND) add_compile_definitions(SUNSHINE_BUILD_X11) include_directories(${X11_INCLUDE_DIR}) @@ -451,51 +453,12 @@ set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic) set_source_files_properties(third-party/nanors/rs.c PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize") include_directories(SYSTEM ${X11_INCLUDE_DIR}) @@ -547,43 +549,7 @@ set_source_files_properties(third-party/nanors/rs.c list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY}) -# Pre-compiled binaries -if(WIN32) Loading @@ -26,7 +26,7 @@ index 1842c67..8afd0e9 100644 - set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64") - endif() -else() - set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11) set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11) - if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64") - else() Loading @@ -52,10 +52,10 @@ index 1842c67..8afd0e9 100644 - ${FFMPEG_PREPARED_BINARIES}/lib/libx265.a - ${HDR10_PLUS_LIBRARY} - ${FFMPEG_PLATFORM_LIBRARIES}) - include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/third-party include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -593,7 +559,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include ${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors ${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors/deps/obl Loading @@ -63,11 +63,13 @@ index 1842c67..8afd0e9 100644 ${PLATFORM_INCLUDE_DIRS} ) @@ -529,6 +492,7 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES @@ -627,7 +592,9 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} enet opus + cbs ${FFMPEG_LIBRARIES} + ${FFMPEG_PLATFORM_LIBRARIES} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES}
pkgs/servers/sunshine/package-lock.json +3 −3 Original line number Diff line number Diff line Loading @@ -20,9 +20,9 @@ } }, "node_modules/@popperjs/core": { "version": "2.11.7", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz", "integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==", "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "peer": true, "funding": { "type": "opencollective", Loading