Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
ninja,
|
|
obs-studio,
|
|
onnxruntime,
|
|
opencv,
|
|
qt6,
|
|
curl,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "obs-backgroundremoval";
|
|
version = "1.1.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "occ-ai";
|
|
repo = "obs-backgroundremoval";
|
|
rev = version;
|
|
hash = "sha256-QoC9/HkwOXMoFNvcOxQkGCLLAJmsja801LKCNT9O9T0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
ninja
|
|
];
|
|
buildInputs = [
|
|
obs-studio
|
|
onnxruntime
|
|
opencv.cxxdev
|
|
qt6.qtbase
|
|
curl
|
|
];
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
cmakeFlags = [
|
|
"--preset linux-x86_64"
|
|
"-DCMAKE_MODULE_PATH:PATH=${src}/cmake"
|
|
"-DUSE_SYSTEM_ONNXRUNTIME=ON"
|
|
"-DUSE_SYSTEM_OPENCV=ON"
|
|
"-DDISABLE_ONNXRUNTIME_GPU=ON"
|
|
];
|
|
|
|
buildPhase = ''
|
|
cd ..
|
|
cmake --build build_x86_64 --parallel
|
|
'';
|
|
|
|
installPhase = ''
|
|
cmake --install build_x86_64 --prefix "$out"
|
|
'';
|
|
|
|
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;
|
|
inherit (obs-studio.meta) platforms;
|
|
};
|
|
}
|