2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-06-10 04:57:09 +02:00
|
|
|
, ffmpeg, libjpeg_turbo, gtk3, alsa-lib, speex, libusbmuxd, libappindicator-gtk3
|
2021-01-03 21:26:43 +01:00
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "droidcam";
|
2021-05-04 05:08:41 +02:00
|
|
|
version = "1.7.3";
|
2021-01-03 21:26:43 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aramg";
|
|
|
|
repo = "droidcam";
|
|
|
|
rev = "v${version}";
|
2021-05-04 05:08:41 +02:00
|
|
|
sha256 = "sha256-Ok8FJweSzmewjYzfBJQ28xGHKK/Y32ng1hOCPVwc8eU=";
|
2021-01-03 21:26:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
libjpeg_turbo
|
|
|
|
gtk3
|
2021-06-10 04:57:09 +02:00
|
|
|
alsa-lib
|
2021-01-03 21:26:43 +01:00
|
|
|
speex
|
|
|
|
libusbmuxd
|
|
|
|
libappindicator-gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-01-13 12:03:29 +01:00
|
|
|
substituteInPlace src/droidcam.c \
|
2021-01-03 21:26:43 +01:00
|
|
|
--replace "/opt/droidcam-icon.png" "$out/share/icons/hicolor/droidcam.png"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=("JPEG=$(pkg-config --libs --cflags libturbojpeg)")
|
|
|
|
makeFlagsArray+=("USBMUXD=$(pkg-config --libs --cflags libusbmuxd-2.0)")
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dt $out/bin droidcam droidcam-cli
|
|
|
|
install -D icon2.png $out/share/icons/hicolor/droidcam.png
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-01-03 21:26:43 +01:00
|
|
|
description = "Linux client for DroidCam app";
|
|
|
|
homepage = "https://github.com/aramg/droidcam";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = [ maintainers.suhr ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|