summary refs log tree commit diff
path: root/pkgs/servers/tvheadend
diff options
context:
space:
mode:
authorDaniel Fullmer <danielrf12@gmail.com>2020-07-28 23:32:56 -0700
committerBjørn Forsman <bjorn.forsman@gmail.com>2020-07-30 23:22:46 +0200
commit2b49e8451495939e70ef07eb37905c0bd4006dd4 (patch)
tree7cee81a5518924c4a4bb9d7cb9c864ecf7b3190c /pkgs/servers/tvheadend
parent971bd90d164ecfc8cedaed1c6cdca02b0fffbcb4 (diff)
downloadnixpkgs-2b49e8451495939e70ef07eb37905c0bd4006dd4.tar
nixpkgs-2b49e8451495939e70ef07eb37905c0bd4006dd4.tar.gz
nixpkgs-2b49e8451495939e70ef07eb37905c0bd4006dd4.tar.bz2
nixpkgs-2b49e8451495939e70ef07eb37905c0bd4006dd4.tar.lz
nixpkgs-2b49e8451495939e70ef07eb37905c0bd4006dd4.tar.xz
nixpkgs-2b49e8451495939e70ef07eb37905c0bd4006dd4.tar.zst
nixpkgs-2b49e8451495939e70ef07eb37905c0bd4006dd4.zip
tvheadend: include dtv scan tables
Diffstat (limited to 'pkgs/servers/tvheadend')
-rw-r--r--pkgs/servers/tvheadend/default.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/servers/tvheadend/default.nix b/pkgs/servers/tvheadend/default.nix
index f97935a4ce3..f4c3270bf3d 100644
--- a/pkgs/servers/tvheadend/default.nix
+++ b/pkgs/servers/tvheadend/default.nix
@@ -1,10 +1,22 @@
 { stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig
 , avahi, dbus, gettext, git, gnutar, gzip, bzip2, ffmpeg_3, libiconv, openssl, python
-, which, zlib }:
+, v4l-utils, which, zlib }:
 
 let
   version = "4.2.8";
 
+  dtv-scan-tables = stdenv.mkDerivation {
+    pname = "dtv-scan-tables";
+    version = "2020-05-18";
+    src = fetchFromGitHub {
+      owner = "tvheadend";
+      repo = "dtv-scan-tables";
+      rev = "e3138a506a064f6dfd0639d69f383e8e576609da";
+      sha256 = "19ac9ds3rfc2xrqcywsbd1iwcpv7vmql7gp01iikxkzcgm2g2b6w";
+    };
+    nativeBuildInputs = [ v4l-utils ];
+    installFlags = [ "DATADIR=$(out)" ];
+  };
 in stdenv.mkDerivation {
   pname = "tvheadend";
   inherit version;
@@ -28,7 +40,7 @@ in stdenv.mkDerivation {
   NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" "-Wno-error=stringop-truncation" ];
 
   # disable dvbscan, as having it enabled causes a network download which
-  # cannot happen during build.
+  # cannot happen during build.  We now include the dtv-scan-tables ourselves
   configureFlags = [
     "--disable-dvbscan"
     "--disable-bintray_cache"
@@ -45,6 +57,9 @@ in stdenv.mkDerivation {
     substituteInPlace src/config.c \
       --replace /usr/bin/tar ${gnutar}/bin/tar
 
+    substituteInPlace src/input/mpegts/scanfile.c \
+      --replace /usr/share/dvb ${dtv-scan-tables}/dvbv5
+
     # the version detection script `support/version` reads this file if it
     # exists, so let's just use that
     echo ${version} > rpm/version