nixpkgs-suyu/pkgs/applications/video/mjpg-streamer/default.nix

32 lines
962 B
Nix
Raw Normal View History

2016-03-12 15:36:52 +01:00
{ stdenv, fetchFromGitHub, cmake, libjpeg }:
2015-01-02 17:35:02 +01:00
stdenv.mkDerivation rec {
2016-03-12 15:36:52 +01:00
name = "mjpg-streamer-${version}";
version = "2016-03-08";
2015-01-02 17:35:02 +01:00
2016-03-12 15:36:52 +01:00
src = fetchFromGitHub {
owner = "jacksonliam";
repo = "mjpg-streamer";
rev = "4060cb64e3557037fd404d10e1c1d076b672e9e8";
sha256 = "0g7y832jsz4ylmq9qp2l4fq6bm8l6dhsbi60fr5jfqpx4l0pia8m";
2015-01-02 17:35:02 +01:00
};
2016-03-12 15:36:52 +01:00
prePatch = ''
cd mjpg-streamer-experimental
2015-01-02 17:35:02 +01:00
'';
2016-03-12 15:36:52 +01:00
nativeBuildInputs = [ cmake ];
buildInputs = [ libjpeg ];
2015-01-02 17:35:02 +01:00
2016-03-12 15:36:52 +01:00
postFixup = ''
patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib/mjpg-streamer" $out/bin/mjpg_streamer
2015-01-02 17:35:02 +01:00
'';
2016-03-12 15:36:52 +01:00
meta = with stdenv.lib; {
2015-01-02 17:35:02 +01:00
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";
2016-03-12 15:36:52 +01:00
platforms = platforms.linux;
license = licenses.gpl2;
2015-01-02 17:35:02 +01:00
};
}