summary refs log tree commit diff
path: root/pkgs/servers/tvheadend/default.nix
blob: 8b963e58663227500d96d8f080fe53c54097e4a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{avahi, cmake, dbus, fetchurl, gettext, git, gnutar, gzip, bzip2, ffmpeg, libiconv, openssl, pkgconfig, python
, stdenv, which, zlib}:

with stdenv.lib;

let version = "4.2.1";
    pkgName = "tvheadend";

in

stdenv.mkDerivation rec {
  name = "${pkgName}-${version}";

  src = fetchurl {
    url = "https://github.com/tvheadend/tvheadend/archive/v${version}.tar.gz";
    sha256 = "1wrj3w595c1hfl2vmfdmp5qncy5samqi7iisyq76jf3nlzgw6dvn";
  };

  enableParallelBuilding = true;

  # 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"
  ];

  buildPhase = "make";

  dontUseCmakeConfigure = true;

  buildInputs = [ avahi dbus cmake gettext git gnutar gzip bzip2 ffmpeg libiconv openssl pkgconfig python
    which zlib ];

  preConfigure = ''
    patchShebangs ./configure
    substituteInPlace src/config.c --replace /usr/bin/tar ${gnutar}/bin/tar
  '';

  meta = {
    description = "TV streaming server";
    longDescription = ''
	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 = licenses.gpl3;
    platforms = platforms.unix;
    maintainers = [ maintainers.simonvandel ];
  };
}