nixpkgs/pkgs/servers/tvheadend/default.nix

70 lines
1.9 KiB
Nix
Raw Normal View History

{ 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
let
version = "4.2.8";
2019-08-14 00:52:01 +03:00
in stdenv.mkDerivation {
2019-08-14 00:52:01 +03:00
pname = "tvheadend";
inherit version;
src = fetchFromGitHub {
owner = "tvheadend";
repo = "tvheadend";
rev = "v${version}";
sha256 = "1xq059r2bplaa0nd0wkhw80jfwd962x0h5hgd7fz2yp6largw34m";
};
2015-06-20 23:33:57 +03:00
buildInputs = [
avahi dbus gettext git gnutar gzip bzip2 ffmpeg libiconv openssl python
which zlib
];
2015-06-20 23:33:57 +03:00
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
2015-06-20 23:33:57 +03:00
enableParallelBuilding = true;
2019-11-03 16:10:23 +03:00
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" "-Wno-error=stringop-truncation" ];
2019-09-13 04:11:56 +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"
];
2017-04-22 22:10:52 +03:00
dontUseCmakeConfigure = true;
preConfigure = ''
patchShebangs ./configure
2017-11-17 13:04:52 +03:00
substituteInPlace src/config.c \
--replace /usr/bin/tar ${gnutar}/bin/tar
# 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-06-20 23:33:57 +03:00
meta = with stdenv.lib; {
description = "TV streaming server";
2015-06-20 23:33:57 +03:00
longDescription = ''
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.'';
homepage = "https://tvheadend.org";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ simonvandel ];
2015-06-20 23:33:57 +03:00
};
}