commit fb4ae1ca78170b5755c137683e4796269af94f5c Author: asonix Date: Wed Aug 24 21:15:57 2022 -0500 It builds diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..f3416ec --- /dev/null +++ b/default.nix @@ -0,0 +1,6 @@ +let + pkgs = import { }; +in +with pkgs; { + obs-scene-switcher = libsForQt5.callPackage ./obs-scene-switcher.nix { }; +} diff --git a/obs-scene-switcher.nix b/obs-scene-switcher.nix new file mode 100644 index 0000000..ba9e4e1 --- /dev/null +++ b/obs-scene-switcher.nix @@ -0,0 +1,53 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, curlFull +, ffmpeg +, libaom +, ninja +, pkg-config +, procps +, qtbase +, obs-studio +, opencv +, xorg +}: + +stdenv.mkDerivation rec { + pname = "obs-streamfx"; + version = "1.17.7"; + + src = fetchFromGitHub { + owner = "WarmUpTill"; + repo = "SceneSwitcher"; + rev = version; + sha256 = "iBs+c9+4SOISu4mshjcv+AXtLemSKtadQU2UXXiND7I="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake ninja pkg-config ]; + buildInputs = with xorg; [ curlFull libXScrnSaver libXtst qtbase opencv procps ]; + + dontWrapQtApps = true; + + cmakeFlags = with lib; [ + "-DBUILD_OUT_OF_TREE=1" + "-DENABLE_PIPEWIRE=ON" + "-DWITH_RTMPS=OFF" + "-DLIBOBS_LIB=${obs-studio.out}/lib" + "-DLIBOBS_INCLUDE_DIR=${obs-studio.out}/include" + "-DLIBOBS_FRONTEND_API_LIB=${obs-studio.out}/lib" + "-DLIBOBS_FRONTEND_INCLUDE_DIR=${obs-studio.out}/include/obs" + ]; + + patches = [ ]; + + meta = with lib; { + description = "StreamFX is a plugin for OBSĀ® Studio which adds many new effects, filters, sources, transitions and encoders - all for free! Be it 3D Transform, Blur, complex Masking, or even custom shaders, you'll find it all here."; + homepage = "https://s.xaymar.com/streamfx-dc"; + maintainers = [ ]; + license = licenses.gpl2Plus; + platforms = [ "x86_64-linux" ]; + }; +}