2019-10-08 15:05:57 +01:00
|
|
|
# (the following is somewhat lifted from ./linuxbrowser.nix)
|
|
|
|
# We don't have a wrapper which can supply obs-studio plugins so you have to
|
|
|
|
# somewhat manually install this:
|
|
|
|
|
|
|
|
# nix-env -f . -iA obs-wlrobs
|
|
|
|
# mkdir -p ~/.config/obs-studio/plugins/wlrobs/bin/64bit
|
|
|
|
# ln -s ~/.nix-profile/share/obs/obs-plugins/wlrobs/bin/64bit/libwlrobs.so ~/.config/obs-studio/plugins/wlrobs/bin/64bit
|
2020-01-12 15:08:10 +00:00
|
|
|
{ stdenv, fetchhg, wayland, obs-studio
|
|
|
|
, meson, ninja, pkgconfig, libX11
|
|
|
|
, dmabufSupport ? false, libdrm ? null, libGL ? null}:
|
|
|
|
|
|
|
|
assert dmabufSupport -> libdrm != null && libGL != null;
|
|
|
|
|
2019-10-08 15:05:57 +01:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "obs-wlrobs";
|
2020-08-01 04:13:00 +01:00
|
|
|
version = "20200622";
|
2019-10-08 15:05:57 +01:00
|
|
|
|
|
|
|
src = fetchhg {
|
|
|
|
url = "https://hg.sr.ht/~scoopta/wlrobs";
|
2020-08-01 04:13:00 +01:00
|
|
|
rev = "1d3acaaf64049da3da9721aa8b9b47582fe0081b";
|
|
|
|
sha256 = "0qrcf8024r4ynfjw0zx8vn59ygx9q5rb196s6nyxmy3gkv2lfxlq";
|
2019-10-08 15:05:57 +01:00
|
|
|
};
|
|
|
|
|
2020-01-12 15:08:10 +00:00
|
|
|
buildInputs = [ libX11 libGL libdrm meson ninja pkgconfig wayland obs-studio ];
|
2019-10-08 15:05:57 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/obs/obs-plugins/wlrobs/bin/64bit
|
|
|
|
cp ./libwlrobs.so $out/share/obs/obs-plugins/wlrobs/bin/64bit/
|
|
|
|
'';
|
|
|
|
|
2020-01-12 15:08:10 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Duse_dmabuf=${if dmabufSupport then "true" else "false"}"
|
|
|
|
];
|
|
|
|
|
2019-10-08 15:05:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An obs-studio plugin that allows you to screen capture on wlroots based wayland compositors";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://hg.sr.ht/~scoopta/wlrobs";
|
2019-10-08 15:05:57 +01:00
|
|
|
maintainers = with maintainers; [ grahamc ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|