about summary refs log tree commit diff
path: root/pkgs/applications/video/mjpg-streamer
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-03-12 17:36:52 +0300
committerNikolay Amiantov <ab@fmap.me>2016-03-12 18:52:58 +0300
commit84e8fece4187662d65d12feda26f2c39c003a7ed (patch)
treecbb05d70776b0d1ef007843e2e04ff59bc7accb7 /pkgs/applications/video/mjpg-streamer
parent4a01f70f8f374f3f0e07f24957e212305325cf11 (diff)
downloadnixlib-84e8fece4187662d65d12feda26f2c39c003a7ed.tar
nixlib-84e8fece4187662d65d12feda26f2c39c003a7ed.tar.gz
nixlib-84e8fece4187662d65d12feda26f2c39c003a7ed.tar.bz2
nixlib-84e8fece4187662d65d12feda26f2c39c003a7ed.tar.lz
nixlib-84e8fece4187662d65d12feda26f2c39c003a7ed.tar.xz
nixlib-84e8fece4187662d65d12feda26f2c39c003a7ed.tar.zst
nixlib-84e8fece4187662d65d12feda26f2c39c003a7ed.zip
mjpg-streamer: 182 -> 2016-03-08
Diffstat (limited to 'pkgs/applications/video/mjpg-streamer')
-rw-r--r--pkgs/applications/video/mjpg-streamer/default.nix37
1 files changed, 17 insertions, 20 deletions
diff --git a/pkgs/applications/video/mjpg-streamer/default.nix b/pkgs/applications/video/mjpg-streamer/default.nix
index 7cacc4fcf05e..5409cf9f2f7f 100644
--- a/pkgs/applications/video/mjpg-streamer/default.nix
+++ b/pkgs/applications/video/mjpg-streamer/default.nix
@@ -1,34 +1,31 @@
-{stdenv, fetchsvn, pkgconfig, libjpeg, imagemagick, libv4l}:
+{ stdenv, fetchFromGitHub, cmake, libjpeg }:
 
 stdenv.mkDerivation rec {
-  rev = "182";
-  name = "mjpg-streamer-${rev}";
+  name = "mjpg-streamer-${version}";
+  version = "2016-03-08";
 
-  src = fetchsvn {
-    url = https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer;
-    inherit rev;
-    sha256 = "008k2wk6xagprbiwk8fvzbz4dd6i8kzrr9n62gj5i1zdv7zcb16q";
+  src = fetchFromGitHub {
+    owner = "jacksonliam";
+    repo = "mjpg-streamer";
+    rev = "4060cb64e3557037fd404d10e1c1d076b672e9e8";
+    sha256 = "0g7y832jsz4ylmq9qp2l4fq6bm8l6dhsbi60fr5jfqpx4l0pia8m";
   };
 
-  patchPhase = ''
-    substituteInPlace Makefile "make -C plugins\/input_gspcav1" "# make -C plugins\/input_gspcav1"
-    substituteInPlace Makefile "cp plugins\/input_gspcav1\/input_gspcav1.so" "# cp plugins\/input_gspcav1\/input_gspcav1.so"
+  prePatch = ''
+    cd mjpg-streamer-experimental
   '';
 
-  postFixup = ''
-    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib:$out/lib/plugins" $out/bin/mjpg_streamer
-  '';
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libjpeg ];
 
-  makeFlags = "DESTDIR=$(out)";
-
-  preInstall = ''
-    mkdir -p $out/{bin,lib}
+  postFixup = ''
+    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib/mjpg-streamer" $out/bin/mjpg_streamer
   '';
 
-  buildInputs = [ pkgconfig libjpeg imagemagick libv4l ];
-  
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://sourceforge.net/projects/mjpg-streamer/;
     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";
+    platforms = platforms.linux;
+    licenses = licenses.gpl2;
   };
 }