mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
commit
4b661693cb
@ -212,6 +212,7 @@
|
||||
shell = "Shell Turner <cam.turn@gmail.com>";
|
||||
shlevy = "Shea Levy <shea@shealevy.com>";
|
||||
simons = "Peter Simons <simons@cryp.to>";
|
||||
simonvandel = "Simon Vandel Sillesen <simon.vandel@gmail.com>";
|
||||
sjagoe = "Simon Jagoe <simon@simonjagoe.com>";
|
||||
sjmackenzie = "Stewart Mackenzie <setori88@gmail.com>";
|
||||
skeidel = "Sven Keidel <svenkeidel@gmail.com>";
|
||||
|
@ -41,6 +41,7 @@
|
||||
<itemizedlist>
|
||||
<listitem><para><literal>brltty</literal></para></listitem>
|
||||
<listitem><para><literal>marathon</literal></para></listitem>
|
||||
<listitem><para><literal>Tvheadend</literal></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
|
@ -221,6 +221,7 @@
|
||||
skydns = 197;
|
||||
ripple-rest = 198;
|
||||
nix-serve = 199;
|
||||
tvheadend = 200;
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||
|
||||
@ -420,6 +421,7 @@
|
||||
#skydns = 197; #unused
|
||||
#ripple-rest = 198; #unused
|
||||
#nix-serve = 199; #unused
|
||||
#tvheadend = 200; #unused
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing
|
||||
# uid. Users and groups with the same name should have equal
|
||||
|
@ -333,6 +333,7 @@
|
||||
./services/networking/tftpd.nix
|
||||
./services/networking/tlsdated.nix
|
||||
./services/networking/tox-bootstrapd.nix
|
||||
./services/networking/tvheadend.nix
|
||||
./services/networking/unbound.nix
|
||||
./services/networking/unifi.nix
|
||||
./services/networking/vsftpd.nix
|
||||
|
61
nixos/modules/services/networking/tvheadend.nix
Normal file
61
nixos/modules/services/networking/tvheadend.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{ config, coreutils, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.services.tvheadend;
|
||||
pidFile = "${config.users.extraUsers.tvheadend.home}/tvheadend.pid";
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
services.tvheadend = {
|
||||
enable = mkEnableOption "Tvheadend";
|
||||
httpPort = mkOption {
|
||||
type = types.int;
|
||||
default = 9981;
|
||||
description = "Port to bind HTTP to.";
|
||||
};
|
||||
|
||||
htspPort = mkOption {
|
||||
type = types.int;
|
||||
default = 9982;
|
||||
description = "Port to bind HTSP to.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.extraUsers.tvheadend = {
|
||||
description = "Tvheadend Service user";
|
||||
home = "/var/lib/tvheadend";
|
||||
createHome = true;
|
||||
uid = config.ids.uids.tvheadend;
|
||||
};
|
||||
|
||||
systemd.services.tvheadend = {
|
||||
description = "Tvheadend TV streaming server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
PIDFile = pidFile;
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
User = "tvheadend";
|
||||
Group = "video";
|
||||
ExecStart = ''
|
||||
${pkgs.tvheadend}/bin/tvheadend \
|
||||
--http_port ${toString cfg.httpPort} \
|
||||
--htsp_port ${toString cfg.htspPort} \
|
||||
-f \
|
||||
-C \
|
||||
-p ${pidFile} \
|
||||
-u tvheadend \
|
||||
-g video
|
||||
'';
|
||||
ExecStop = "${pkgs.coreutils}/bin/rm ${pidFile}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
pkgs/servers/tvheadend/default.nix
Normal file
31
pkgs/servers/tvheadend/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{avahi, dbus, fetchurl, git, gzip, libav, libiconv, openssl, pkgconfig, python, stdenv, which, zlib}:
|
||||
|
||||
let version = "4.0.4";
|
||||
pkgName = "tvheadend"; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pkgName}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/tvheadend/tvheadend/archive/v${version}.tar.gz";
|
||||
sha256 = "acc5c852bccb32d6a281f523e78a1cceb4d41987fe015aba3f66e1898b02c168";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ avahi dbus git gzip libav libiconv openssl pkgconfig python which zlib];
|
||||
|
||||
preConfigure = "patchShebangs ./configure";
|
||||
|
||||
meta = {
|
||||
description = "TV steaming 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 = stdenv.lib.licenses.gpl3;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.simonvandel ];
|
||||
};
|
||||
}
|
@ -14775,6 +14775,8 @@ let
|
||||
|
||||
tup = callPackage ../development/tools/build-managers/tup { };
|
||||
|
||||
tvheadend = callPackage ../servers/tvheadend { };
|
||||
|
||||
utf8proc = callPackage ../development/libraries/utf8proc { };
|
||||
|
||||
vbam = callPackage ../misc/emulators/vbam {
|
||||
|
Loading…
Reference in New Issue
Block a user