mirror of https://github.com/materusPL/Nixerus.git
swiftshader: init package | obs-studio: use swiftshader
This commit is contained in:
parent
87618759a2
commit
bb5b8d73c4
|
@ -47,6 +47,8 @@
|
||||||
, websocketpp
|
, websocketpp
|
||||||
, amf-headers
|
, amf-headers
|
||||||
, libGL
|
, libGL
|
||||||
|
, vulkan-loader
|
||||||
|
, swiftshader
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -107,6 +109,7 @@ stdenv.mkDerivation rec {
|
||||||
libva
|
libva
|
||||||
srt
|
srt
|
||||||
qtwayland
|
qtwayland
|
||||||
|
swiftshader
|
||||||
]
|
]
|
||||||
++ optionals scriptingSupport [ luajit python3 ]
|
++ optionals scriptingSupport [ luajit python3 ]
|
||||||
++ optional alsaSupport alsa-lib
|
++ optional alsaSupport alsa-lib
|
||||||
|
@ -120,6 +123,7 @@ stdenv.mkDerivation rec {
|
||||||
cp -r $i cef/Release/
|
cp -r $i cef/Release/
|
||||||
cp -r $i cef/Resources/
|
cp -r $i cef/Resources/
|
||||||
done
|
done
|
||||||
|
cp -r ${swiftshader}/lib/libvk_swiftshader.so cef/Release/
|
||||||
cp -r ${libcef}/lib/libcef.so cef/Release/
|
cp -r ${libcef}/lib/libcef.so cef/Release/
|
||||||
cp -r ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
|
cp -r ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
|
||||||
cp -r ${libcef}/include cef/
|
cp -r ${libcef}/include cef/
|
||||||
|
@ -142,7 +146,7 @@ stdenv.mkDerivation rec {
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
qtWrapperArgs+=(
|
qtWrapperArgs+=(
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libX11 libvlc ]}"
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libX11 libvlc ]}"
|
||||||
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}"
|
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL vulkan-loader ]}"
|
||||||
--prefix LD_LIBRARY_PATH : "$out/lib"
|
--prefix LD_LIBRARY_PATH : "$out/lib"
|
||||||
''${gappsWrapperArgs[@]}
|
''${gappsWrapperArgs[@]}
|
||||||
)
|
)
|
||||||
|
|
|
@ -15,11 +15,13 @@ rec {
|
||||||
VideoDecodeAcceleration VideoToolbox;
|
VideoDecodeAcceleration VideoToolbox;
|
||||||
};
|
};
|
||||||
|
|
||||||
obs-amf = pkgs.qt6Packages.callPackage ./apps/obs { ffmpeg = ffmpeg6-amf-full; };
|
obs-amf = pkgs.qt6Packages.callPackage ./apps/obs { ffmpeg = ffmpeg6-amf-full; inherit swiftshader;};
|
||||||
|
|
||||||
polymc = pkgs.qt6Packages.callPackage ./apps/games/polymc {};
|
polymc = pkgs.qt6Packages.callPackage ./apps/games/polymc {};
|
||||||
|
|
||||||
vpk_fuse = callPackage ./apps/vpk_fuse.nix {};
|
vpk_fuse = callPackage ./apps/vpk_fuse.nix {};
|
||||||
|
|
||||||
|
swiftshader = callPackage ./libs/swiftshader.nix {};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, lib, stdenv, fetchFromGitHub, cmake, python3 }:
|
||||||
|
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "swiftshader";
|
||||||
|
version = "20072023";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "google";
|
||||||
|
repo = "SwiftShader";
|
||||||
|
rev = "4a260c12b8c155103435a7b2b99b5227f6ce7594";
|
||||||
|
sha256 = "sha256-WcA1EazeuRlFhIaAKgJHp+rUkCR2vqcINkTMYOgrbNI=";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ cmake python3 ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib
|
||||||
|
mv libvk_swiftshader.so $out/lib
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "SwiftShader is a high-performance CPU-based implementation of the Vulkan 1.3 graphics API";
|
||||||
|
homepage = "https://swiftshader.googlesource.com/SwiftShader";
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue