1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 ffmpeg,
8 libjpeg,
9 libmicrohttpd,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "motion";
14 version = "4.7.0";
15
16 src = fetchFromGitHub {
17 owner = "Motion-Project";
18 repo = "motion";
19 rev = "release-${version}";
20 sha256 = "sha256-bGjiO14a7xKRgoeo5JlexXlKggE+agRMmQViBXagmt8=";
21 };
22
23 nativeBuildInputs = [
24 autoreconfHook
25 pkg-config
26 ];
27
28 buildInputs = [
29 ffmpeg
30 libjpeg
31 libmicrohttpd
32 ];
33
34 meta = with lib; {
35 description = "Monitors the video signal from cameras";
36 homepage = "https://motion-project.github.io/";
37 license = licenses.gpl2Plus;
38 maintainers = with maintainers; [
39 puffnfresh
40 veprbl
41 ];
42 platforms = platforms.unix;
43 # never built on aarch64-darwin since first introduction in nixpkgs
44 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
45 mainProgram = "motion";
46 };
47}