Commit d763075d authored by Aroun Olorin's avatar Aroun Olorin
Browse files

obs-backgroundremoval: reinit at 0.5.16

parent 3e4e464b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@

  looking-glass-obs = callPackage ./looking-glass-obs.nix { };

  obs-backgroundremoval = callPackage ./obs-backgroundremoval { };

  obs-gstreamer = callPackage ./obs-gstreamer.nix { };

  obs-hyperion = qt6Packages.callPackage ./obs-hyperion/default.nix { };
@@ -40,7 +42,5 @@

  obs-websocket = throw "obs-websocket has been removed: Functionality has been integrated into obs-studio itself.";

  obs-backgroundremoval = throw "obs-backgroundremoval has been removed: It does not work anymore and is unmaintained.";

  wlrobs = callPackage ./wlrobs.nix { };
}
+45 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, cmake
, obs-studio
, onnxruntime
, opencv
}:

stdenv.mkDerivation rec {
  pname = "obs-backgroundremoval";
  version = "0.5.16";

  src = fetchFromGitHub {
    owner = "royshil";
    repo = "obs-backgroundremoval";
    rev = "v${version}";
    hash = "sha256-E+pm/Ma6dZTYlX3DpB49ynTETsRS2TBqgHSCijl/Txc=";
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [ obs-studio onnxruntime opencv ];

  dontWrapQtApps = true;

  cmakeFlags = [
    "-DUSE_SYSTEM_ONNXRUNTIME=ON"
    "-DUSE_SYSTEM_OPENCV=ON"
  ];

  postInstall = ''
    mkdir $out/lib $out/share
    mv $out/obs-plugins/64bit $out/lib/obs-plugins
    rm -rf $out/obs-plugins
    mv $out/data $out/share/obs
  '';

  meta = with lib; {
    description = "OBS plugin to replace the background in portrait images and video";
    homepage = "https://github.com/royshil/obs-backgroundremoval";
    maintainers = with maintainers; [ zahrun ];
    license = licenses.mit;
    platforms = [ "x86_64-linux" "i686-linux" ];
  };
}