blob: d30fb01a663469217b16d71fb1145fef498ada43 (
plain)
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
52
53
54
55
|
{ stdenv, fetchFromGitHub
, pkg-config
, alsaLib
, libjpeg_turbo
, ffmpeg
, libusbmuxd
, speex
, gtk3
, libappindicator-gtk3
}:
stdenv.mkDerivation rec {
pname = "droidcam";
version = "1.6";
src = fetchFromGitHub {
owner = "aramg";
repo = "droidcam";
rev = "v${version}";
sha256 = "1d9qpnmqa3pfwsrpjnxdz76ipk4w37bbxyrazchh4vslnfc886fx";
};
sourceRoot = "source/linux";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
alsaLib
libjpeg_turbo
ffmpeg
libusbmuxd
speex
gtk3
libappindicator-gtk3
];
buildPhase = ''
runHook preBuild
make JPEG_DIR="" JPEG_INCLUDE="" JPEG_LIB="" JPEG="$(pkg-config --libs --cflags libturbojpeg)"
'';
installPhase = ''
runHook preInstall
install -Dm755 "droidcam" "$out/bin/droidcam"
install -Dm755 "droidcam-cli" "$out/bin/droidcam-cli"
install -Dm644 icon2.png "$out/share/pixmaps/droidcam.png"
install -Dm644 README.md "$out/share/licenses/droidcam/LICENSE"
'';
meta = with stdenv.lib; {
description = "A kernel module to create V4L2 loopback devices";
homepage = "https://github.com/aramg/droidcam";
license = licenses.gpl2;
maintainers = [ maintainers.makefu ];
platforms = platforms.linux;
};
}
|