3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/video/droidcam/default.nix

58 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, ffmpeg, libjpeg_turbo, gtk3, alsa-lib, speex, libusbmuxd, libappindicator-gtk3
2021-01-03 20:26:43 +00:00
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "droidcam";
2021-12-06 15:48:49 +00:00
version = "1.8.1";
2021-01-03 20:26:43 +00:00
src = fetchFromGitHub {
owner = "aramg";
repo = "droidcam";
rev = "v${version}";
2021-12-06 15:48:49 +00:00
sha256 = "sha256-3iA7GDTiCx5vHawj8ZBFAK0BIfmxEFuQrVfL7Gi6FhM=";
2021-01-03 20:26:43 +00:00
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
ffmpeg
libjpeg_turbo
gtk3
alsa-lib
2021-01-03 20:26:43 +00:00
speex
libusbmuxd
libappindicator-gtk3
];
postPatch = ''
2021-01-13 11:03:29 +00:00
substituteInPlace src/droidcam.c \
2021-01-03 20:26:43 +00: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
'';
meta = with lib; {
2021-01-03 20:26:43 +00:00
description = "Linux client for DroidCam app";
homepage = "https://github.com/aramg/droidcam";
license = licenses.gpl2Only;
maintainers = [ maintainers.suhr ];
platforms = platforms.linux;
};
}