biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / video / obs-studio / plugins / droidcam-obs / default.nix
bloba1cf5f2e7eef0bf0dac46b5e8a8c6cf010a6e111
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , obs-studio
5 , ffmpeg
6 , libjpeg
7 , libimobiledevice
8 , libusbmuxd
9 , libplist
12 stdenv.mkDerivation rec {
13   pname = "droidcam-obs";
14   version = "2.0.2";
16   src = fetchFromGitHub {
17     owner = "dev47apps";
18     repo = "droidcam-obs-plugin";
19     rev = version;
20     sha256 = "sha256-YtfWwgBhyQYx6QfrKld7p6qUf8BEV/kkQX4QcdHuaYU=";
21   };
23   postPatch = ''
24     substituteInPlace ./linux/linux.mk \
25       --replace "-limobiledevice" "-limobiledevice-1.0" \
26       --replace "-I/usr/include/obs" "-I${obs-studio}/include/obs" \
27       --replace "-I/usr/include/ffmpeg" "-I${ffmpeg}/include"
28   '';
30   preBuild = ''
31     mkdir ./build
32   '';
34   buildInputs = [
35     libjpeg
36     libimobiledevice
37     libusbmuxd
38     libplist
39     obs-studio
40     ffmpeg
41   ];
43   makeFlags = [
44     "ALLOW_STATIC=no"
45     "JPEG_DIR=${lib.getDev libjpeg}"
46     "JPEG_LIB=${lib.getLib libjpeg}/lib"
47     "IMOBILEDEV_DIR=${libimobiledevice}"
48   ];
50   installPhase = ''
51     runHook preInstall
53     mkdir -p $out/share/obs/obs-plugins/droidcam-obs
54     mkdir -p $out/lib/obs-plugins
55     cp build/droidcam-obs.so $out/lib/obs-plugins
56     cp -R ./data/locale $out/share/obs/obs-plugins/droidcam-obs/locale
58     runHook postInstall
59   '';
61   doCheck = false;
63   meta = with lib; {
64     description = "DroidCam OBS";
65     homepage = "https://github.com/dev47apps/droidcam-obs-plugin";
66     license = licenses.gpl2Plus;
67     maintainers = with maintainers; [ ulrikstrid ];
68     platforms = platforms.linux;
69   };