about summary refs log tree commit diff
path: root/pkgs/applications/video/obs-studio/plugins/obs-webkitgtk.nix
blob: 41b33b528a9fc729917580f2c997812cc8c00507 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, stdenv
, fetchFromGitHub
, obs-studio
, webkitgtk
, glib-networking
, meson
, cmake
, pkg-config
, ninja
, wrapGAppsHook3
}:

stdenv.mkDerivation rec {
  pname = "obs-webkitgtk";
  version = "unstable-2023-11-10";

  src = fetchFromGitHub {
    owner = "fzwoch";
    repo = "obs-webkitgtk";
    rev = "ddf230852c3c338e69b248bdf453a0630f1298a7";
    hash = "sha256-DU2w9dRgqWniTE76KTAtFdxIN82VKa/CS6ZdfNcTMto=";
  };

  buildInputs = [
    obs-studio
    webkitgtk
    glib-networking
  ];

  nativeBuildInputs = [
    meson
    cmake
    pkg-config
    ninja
    wrapGAppsHook3
  ];

  postPatch = ''
    substituteInPlace ./obs-webkitgtk.c \
      --replace 'g_file_read_link("/proc/self/exe", NULL)' "g_strdup(\"$out/lib/obs-plugins\")"
  '';

  meta = with lib; {
    description = "Yet another OBS Studio browser source";
    homepage = "https://github.com/fzwoch/obs-webkitgtk";
    maintainers = with maintainers; [ j-hui ];
    license = licenses.gpl2Only;
    platforms = platforms.linux;
  };
}