about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorlethalman <lucabru@src.gnome.org>2015-01-21 10:16:38 +0100
committerlethalman <lucabru@src.gnome.org>2015-01-21 10:16:38 +0100
commitb214a6ab72b14f59688b208440106ca34ab26cc6 (patch)
tree1537bc994d128633ff2fc2e914f7c29157d58ea3 /pkgs/applications/video
parent4b76c1f89789a7cc81c5d27a4172c6bc9dbcfe6d (diff)
parentd4b80026dfd04a6a38947bc556304596cf12a663 (diff)
downloadnixlib-b214a6ab72b14f59688b208440106ca34ab26cc6.tar
nixlib-b214a6ab72b14f59688b208440106ca34ab26cc6.tar.gz
nixlib-b214a6ab72b14f59688b208440106ca34ab26cc6.tar.bz2
nixlib-b214a6ab72b14f59688b208440106ca34ab26cc6.tar.lz
nixlib-b214a6ab72b14f59688b208440106ca34ab26cc6.tar.xz
nixlib-b214a6ab72b14f59688b208440106ca34ab26cc6.tar.zst
nixlib-b214a6ab72b14f59688b208440106ca34ab26cc6.zip
Merge pull request #5532 from bobvanderlinden/mjpg-streamer
add package MJPG-streamer
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/mjpg-streamer/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/applications/video/mjpg-streamer/default.nix b/pkgs/applications/video/mjpg-streamer/default.nix
new file mode 100644
index 000000000000..7cacc4fcf05e
--- /dev/null
+++ b/pkgs/applications/video/mjpg-streamer/default.nix
@@ -0,0 +1,34 @@
+{stdenv, fetchsvn, pkgconfig, libjpeg, imagemagick, libv4l}:
+
+stdenv.mkDerivation rec {
+  rev = "182";
+  name = "mjpg-streamer-${rev}";
+
+  src = fetchsvn {
+    url = https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer;
+    inherit rev;
+    sha256 = "008k2wk6xagprbiwk8fvzbz4dd6i8kzrr9n62gj5i1zdv7zcb16q";
+  };
+
+  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"
+  '';
+
+  postFixup = ''
+    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib:$out/lib/plugins" $out/bin/mjpg_streamer
+  '';
+
+  makeFlags = "DESTDIR=$(out)";
+
+  preInstall = ''
+    mkdir -p $out/{bin,lib}
+  '';
+
+  buildInputs = [ pkgconfig libjpeg imagemagick libv4l ];
+  
+  meta = {
+    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";
+  };
+}