2017-11-01 12:41:21 +03:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig
|
|
|
|
, avahi, dbus, gettext, git, gnutar, gzip, bzip2, ffmpeg, libiconv, openssl, python
|
|
|
|
, which, zlib }:
|
2015-06-20 23:33:57 +03:00
|
|
|
|
2017-11-01 12:41:21 +03:00
|
|
|
let
|
2018-03-28 08:40:31 +03:00
|
|
|
version = "4.2.6";
|
2015-10-21 10:01:42 +03:00
|
|
|
|
2017-11-01 12:41:21 +03:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "tvheadend-${version}";
|
2015-10-21 10:01:42 +03:00
|
|
|
|
2017-11-01 12:41:21 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tvheadend";
|
|
|
|
repo = "tvheadend";
|
|
|
|
rev = "v${version}";
|
2018-03-28 08:40:31 +03:00
|
|
|
sha256 = "0rnhk0r34mfmz3cnf735nzkkyal7pnv16hfyrs0g4v5rk99rlab3";
|
2017-11-01 12:41:21 +03:00
|
|
|
};
|
2015-06-20 23:33:57 +03:00
|
|
|
|
2017-11-01 12:41:21 +03:00
|
|
|
buildInputs = [
|
|
|
|
avahi dbus gettext git gnutar gzip bzip2 ffmpeg libiconv openssl python
|
|
|
|
which zlib
|
|
|
|
];
|
2015-06-20 23:33:57 +03:00
|
|
|
|
2017-11-01 12:41:21 +03:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
|
2015-06-20 23:33:57 +03:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-10-21 10:01:42 +03:00
|
|
|
# disable dvbscan, as having it enabled causes a network download which
|
|
|
|
# cannot happen during build.
|
2017-04-22 22:10:52 +03:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-dvbscan"
|
|
|
|
"--disable-bintray_cache"
|
|
|
|
"--disable-ffmpeg_static"
|
|
|
|
"--disable-hdhomerun_client"
|
|
|
|
"--disable-hdhomerun_static"
|
|
|
|
];
|
2015-06-30 13:58:28 +03:00
|
|
|
|
2017-04-22 22:10:52 +03:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2015-10-24 18:50:30 +03:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs ./configure
|
2017-11-01 12:41:21 +03:00
|
|
|
|
2017-11-17 13:04:52 +03:00
|
|
|
substituteInPlace src/config.c \
|
|
|
|
--replace /usr/bin/tar ${gnutar}/bin/tar
|
2017-11-01 12:41:21 +03:00
|
|
|
|
|
|
|
# the version detection script `support/version` reads this file if it
|
|
|
|
# exists, so let's just use that
|
|
|
|
echo ${version} > rpm/version
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/tvheadend \
|
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ bzip2 ]}
|
2015-10-24 18:50:30 +03:00
|
|
|
'';
|
2015-06-20 23:33:57 +03:00
|
|
|
|
2017-11-01 12:41:21 +03:00
|
|
|
meta = with stdenv.lib; {
|
2017-03-17 20:28:48 +03:00
|
|
|
description = "TV streaming server";
|
2015-06-20 23:33:57 +03:00
|
|
|
longDescription = ''
|
2017-11-01 12:41:21 +03:00
|
|
|
Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
|
2015-06-20 23:33:57 +03:00
|
|
|
supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
|
|
|
|
Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.'';
|
2017-08-01 23:03:30 +03:00
|
|
|
homepage = https://tvheadend.org;
|
2015-10-21 10:01:42 +03:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.unix;
|
2017-11-01 12:41:21 +03:00
|
|
|
maintainers = with maintainers; [ simonvandel ];
|
2015-06-20 23:33:57 +03:00
|
|
|
};
|
|
|
|
}
|