diff options
Diffstat (limited to 'pkgs/servers/tvheadend/default.nix')
-rw-r--r-- | pkgs/servers/tvheadend/default.nix | 71 |
1 files changed, 51 insertions, 20 deletions
diff --git a/pkgs/servers/tvheadend/default.nix b/pkgs/servers/tvheadend/default.nix index c7b4e5153176..c0a3b5a28c31 100644 --- a/pkgs/servers/tvheadend/default.nix +++ b/pkgs/servers/tvheadend/default.nix @@ -1,35 +1,66 @@ -{avahi, dbus, fetchurl, git, gzip, libav, libiconv, openssl, pkgconfig, python -, stdenv, which, zlib}: +{ stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig +, avahi, dbus, gettext, git, gnutar, gzip, bzip2, ffmpeg, libiconv, openssl, python +, which, zlib }: -let version = "4.0.4"; - pkgName = "tvheadend"; in +let + version = "4.2.6"; -stdenv.mkDerivation rec { - name = "${pkgName}-${version}"; +in stdenv.mkDerivation rec { + name = "tvheadend-${version}"; - src = fetchurl { - url = "https://github.com/tvheadend/tvheadend/archive/v${version}.tar.gz"; - sha256 = "acc5c852bccb32d6a281f523e78a1cceb4d41987fe015aba3f66e1898b02c168"; + src = fetchFromGitHub { + owner = "tvheadend"; + repo = "tvheadend"; + rev = "v${version}"; + sha256 = "0rnhk0r34mfmz3cnf735nzkkyal7pnv16hfyrs0g4v5rk99rlab3"; }; + buildInputs = [ + avahi dbus gettext git gnutar gzip bzip2 ffmpeg libiconv openssl python + which zlib + ]; + + nativeBuildInputs = [ cmake makeWrapper pkgconfig ]; + enableParallelBuilding = true; - configureFlags = [ "--disable-dvbscan" ]; + # disable dvbscan, as having it enabled causes a network download which + # cannot happen during build. + configureFlags = [ + "--disable-dvbscan" + "--disable-bintray_cache" + "--disable-ffmpeg_static" + "--disable-hdhomerun_client" + "--disable-hdhomerun_static" + ]; + + dontUseCmakeConfigure = true; + + preConfigure = '' + patchShebangs ./configure + + substituteInPlace src/config.c \ + --replace /usr/bin/tar ${gnutar}/bin/tar - buildInputs = [ avahi dbus git gzip libav libiconv openssl pkgconfig python - which zlib ]; + # the version detection script `support/version` reads this file if it + # exists, so let's just use that + echo ${version} > rpm/version + ''; - preConfigure = "patchShebangs ./configure"; + postInstall = '' + wrapProgram $out/bin/tvheadend \ + --prefix PATH : ${stdenv.lib.makeBinPath [ bzip2 ]} + ''; - meta = { - description = "TV steaming server"; + meta = with stdenv.lib; { + description = "TV streaming server"; longDescription = '' - Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android + Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android 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 = stdenv.lib.licenses.gpl3; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.simonvandel ]; + homepage = https://tvheadend.org; + license = licenses.gpl3; + platforms = platforms.unix; + maintainers = with maintainers; [ simonvandel ]; }; } |