mjpg-streamer: 182 -> 2016-03-08

+17 -20
+17 -20
pkgs/applications/video/mjpg-streamer/default.nix
··· 1 - {stdenv, fetchsvn, pkgconfig, libjpeg, imagemagick, libv4l}: 1 + { stdenv, fetchFromGitHub, cmake, libjpeg }: 2 2 3 3 stdenv.mkDerivation rec { 4 - rev = "182"; 5 - name = "mjpg-streamer-${rev}"; 4 + name = "mjpg-streamer-${version}"; 5 + version = "2016-03-08"; 6 6 7 - src = fetchsvn { 8 - url = https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer; 9 - inherit rev; 10 - sha256 = "008k2wk6xagprbiwk8fvzbz4dd6i8kzrr9n62gj5i1zdv7zcb16q"; 7 + src = fetchFromGitHub { 8 + owner = "jacksonliam"; 9 + repo = "mjpg-streamer"; 10 + rev = "4060cb64e3557037fd404d10e1c1d076b672e9e8"; 11 + sha256 = "0g7y832jsz4ylmq9qp2l4fq6bm8l6dhsbi60fr5jfqpx4l0pia8m"; 11 12 }; 12 13 13 - patchPhase = '' 14 - substituteInPlace Makefile "make -C plugins\/input_gspcav1" "# make -C plugins\/input_gspcav1" 15 - substituteInPlace Makefile "cp plugins\/input_gspcav1\/input_gspcav1.so" "# cp plugins\/input_gspcav1\/input_gspcav1.so" 14 + prePatch = '' 15 + cd mjpg-streamer-experimental 16 16 ''; 17 17 18 - postFixup = '' 19 - patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib:$out/lib/plugins" $out/bin/mjpg_streamer 20 - ''; 18 + nativeBuildInputs = [ cmake ]; 19 + buildInputs = [ libjpeg ]; 21 20 22 - makeFlags = "DESTDIR=$(out)"; 23 - 24 - preInstall = '' 25 - mkdir -p $out/{bin,lib} 21 + postFixup = '' 22 + patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib/mjpg-streamer" $out/bin/mjpg_streamer 26 23 ''; 27 24 28 - buildInputs = [ pkgconfig libjpeg imagemagick libv4l ]; 29 - 30 - meta = { 25 + meta = with stdenv.lib; { 31 26 homepage = http://sourceforge.net/projects/mjpg-streamer/; 32 27 description = "MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or other input plugins and streams them as M-JPEG via HTTP to webbrowsers, VLC and other software"; 28 + platforms = platforms.linux; 29 + licenses = licenses.gpl2; 33 30 }; 34 31 }