git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #8438 from simonvandel/master

Add tvheadend:4.0.4

commit4b661693cb8531fa510af0ea035708fcba9e3b07 authorArseniy Seroka <jagajaga@users.noreply.github.com> dateWed 24 Jun 2015, 16:36 (11 years ago) parent5ee8b669dab1a8
7 files changed+99
lib/maintainers.nix+1 nixos/doc/manual/release-notes/rl-unstable.xml+1 nixos/modules/misc/ids.nix+2 nixos/modules/module-list.nix+1 nixos/modules/services/networking/tvheadend.nix+61 pkgs/servers/tvheadend/default.nix+31 pkgs/top-level/all-packages.nix+2
lib/maintainers.nix+1
@@ -212,6 +212,7 @@
212212 shell = "Shell Turner <cam.turn@gmail.com>";
213213 shlevy = "Shea Levy <shea@shealevy.com>";
214214 simons = "Peter Simons <simons@cryp.to>";
215+ simonvandel = "Simon Vandel Sillesen <simon.vandel@gmail.com>";
215216 sjagoe = "Simon Jagoe <simon@simonjagoe.com>";
216217 sjmackenzie = "Stewart Mackenzie <setori88@gmail.com>";
217218 skeidel = "Sven Keidel <svenkeidel@gmail.com>";
nixos/doc/manual/release-notes/rl-unstable.xml+1
@@ -41,6 +41,7 @@
4141<itemizedlist>
4242<listitem><para><literal>brltty</literal></para></listitem>
4343<listitem><para><literal>marathon</literal></para></listitem>
44+<listitem><para><literal>Tvheadend</literal></para></listitem>
4445</itemizedlist>
4546</para>
4647
nixos/modules/misc/ids.nix+2
@@ -221,6 +221,7 @@
221221 skydns = 197;
222222 ripple-rest = 198;
223223 nix-serve = 199;
224+ tvheadend = 200;
224225
225226 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
226227
@@ -420,6 +421,7 @@
420421 #skydns = 197; #unused
421422 #ripple-rest = 198; #unused
422423 #nix-serve = 199; #unused
424+ #tvheadend = 200; #unused
423425
424426 # When adding a gid, make sure it doesn't match an existing
425427 # uid. Users and groups with the same name should have equal
nixos/modules/module-list.nix+1
@@ -333,6 +333,7 @@
333333 ./services/networking/tftpd.nix
334334 ./services/networking/tlsdated.nix
335335 ./services/networking/tox-bootstrapd.nix
336+ ./services/networking/tvheadend.nix
336337 ./services/networking/unbound.nix
337338 ./services/networking/unifi.nix
338339 ./services/networking/vsftpd.nix
nixos/modules/services/networking/tvheadend.nixnew file+61
@@ -0,0 +1,61 @@
1+{ config, coreutils, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let cfg = config.services.tvheadend;
6+ pidFile = "${config.users.extraUsers.tvheadend.home}/tvheadend.pid";
7+in
8+
9+{
10+ options = {
11+ services.tvheadend = {
12+ enable = mkEnableOption "Tvheadend";
13+ httpPort = mkOption {
14+ type = types.int;
15+ default = 9981;
16+ description = "Port to bind HTTP to.";
17+ };
18+
19+ htspPort = mkOption {
20+ type = types.int;
21+ default = 9982;
22+ description = "Port to bind HTSP to.";
23+ };
24+ };
25+ };
26+
27+ config = mkIf cfg.enable {
28+ users.extraUsers.tvheadend = {
29+ description = "Tvheadend Service user";
30+ home = "/var/lib/tvheadend";
31+ createHome = true;
32+ uid = config.ids.uids.tvheadend;
33+ };
34+
35+ systemd.services.tvheadend = {
36+ description = "Tvheadend TV streaming server";
37+ wantedBy = [ "multi-user.target" ];
38+ after = [ "network.target" ];
39+
40+ serviceConfig = {
41+ Type = "forking";
42+ PIDFile = pidFile;
43+ Restart = "always";
44+ RestartSec = 5;
45+ User = "tvheadend";
46+ Group = "video";
47+ ExecStart = ''
48+ ${pkgs.tvheadend}/bin/tvheadend \
49+ --http_port ${toString cfg.httpPort} \
50+ --htsp_port ${toString cfg.htspPort} \
51+ -f \
52+ -C \
53+ -p ${pidFile} \
54+ -u tvheadend \
55+ -g video
56+ '';
57+ ExecStop = "${pkgs.coreutils}/bin/rm ${pidFile}";
58+ };
59+ };
60+ };
61+}
pkgs/servers/tvheadend/default.nixnew file+31
@@ -0,0 +1,31 @@
1+{avahi, dbus, fetchurl, git, gzip, libav, libiconv, openssl, pkgconfig, python, stdenv, which, zlib}:
2+
3+let version = "4.0.4";
4+ pkgName = "tvheadend"; in
5+
6+stdenv.mkDerivation rec {
7+ name = "${pkgName}-${version}";
8+
9+ src = fetchurl {
10+ url = "https://github.com/tvheadend/tvheadend/archive/v${version}.tar.gz";
11+ sha256 = "acc5c852bccb32d6a281f523e78a1cceb4d41987fe015aba3f66e1898b02c168";
12+ };
13+
14+ enableParallelBuilding = true;
15+
16+ buildInputs = [ avahi dbus git gzip libav libiconv openssl pkgconfig python which zlib];
17+
18+ preConfigure = "patchShebangs ./configure";
19+
20+ meta = {
21+ description = "TV steaming server";
22+ longDescription = ''
23+ Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
24+ supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
25+ Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.'';
26+ homepage = "https://tvheadend.org";
27+ license = stdenv.lib.licenses.gpl3;
28+ platforms = stdenv.lib.platforms.unix;
29+ maintainers = [ stdenv.lib.maintainers.simonvandel ];
30+ };
31+}
pkgs/top-level/all-packages.nix+2
@@ -14775,6 +14775,8 @@ let
1477514775
1477614776 tup = callPackage ../development/tools/build-managers/tup { };
1477714777
14778+ tvheadend = callPackage ../servers/tvheadend { };
14779+
1477814780 utf8proc = callPackage ../development/libraries/utf8proc { };
1477914781
1478014782 vbam = callPackage ../misc/emulators/vbam {