From f6e4fe96f4b2f8c4b7fb2b0a46290cf4e4e10860 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sat, 14 Jan 2023 12:44:04 +0100 Subject: [PATCH 1/5] dtv-scan-tables: set PREFIX=$out, put files in `/share/dvbv5/..` This changes the output directory layout: Channel files are placed in `$out/share/dvbv5/dvb-xyz` instead of `$out/dvbv5/dvb-xyz`. This is closer to the layout common for other packages and facilitates merging packages with `buildEnv`. The only depender `tvheadend` is updated accordingly. --- pkgs/data/misc/dtv-scan-tables/default.nix | 4 ++-- pkgs/servers/tvheadend/default.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/data/misc/dtv-scan-tables/default.nix b/pkgs/data/misc/dtv-scan-tables/default.nix index 741823871f4a..1761f36c36c2 100644 --- a/pkgs/data/misc/dtv-scan-tables/default.nix +++ b/pkgs/data/misc/dtv-scan-tables/default.nix @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { v4l-utils ]; - installFlags = [ - "DATADIR=$(out)" + makeFlags = [ + "PREFIX=$(out)" ]; meta = with lib; { diff --git a/pkgs/servers/tvheadend/default.nix b/pkgs/servers/tvheadend/default.nix index 72945ffaedbb..833d31de4013 100644 --- a/pkgs/servers/tvheadend/default.nix +++ b/pkgs/servers/tvheadend/default.nix @@ -105,7 +105,7 @@ in stdenv.mkDerivation { --replace /usr/bin/tar ${gnutar}/bin/tar substituteInPlace src/input/mpegts/scanfile.c \ - --replace /usr/share/dvb ${dtv-scan-tables}/dvbv5 + --replace /usr/share/dvb ${dtv-scan-tables}/share/dvbv5 # the version detection script `support/version` reads this file if it # exists, so let's just use that From 4e1a99790c3a7d59d7d96cf7daefab1f609f8acd Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sat, 14 Jan 2023 13:03:34 +0100 Subject: [PATCH 2/5] dtv-scan-tables: check for spurious references in build result This package is pure data, so it must not have any runtime dependencies. --- pkgs/data/misc/dtv-scan-tables/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/data/misc/dtv-scan-tables/default.nix b/pkgs/data/misc/dtv-scan-tables/default.nix index 1761f36c36c2..4cbf43c144b2 100644 --- a/pkgs/data/misc/dtv-scan-tables/default.nix +++ b/pkgs/data/misc/dtv-scan-tables/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation rec { "PREFIX=$(out)" ]; + allowedReferences = [ ]; + meta = with lib; { description = "Digital TV scan tables"; homepage = "https://github.com/tvheadend/dtv-scan-tables"; From b8714f08a47abf6163955a5e218d896161bfe774 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sat, 14 Jan 2023 13:17:04 +0100 Subject: [PATCH 3/5] dtv-scan-tables: update/extend meta descriptions * `description`: add some keywords that help users in need of transponder tables to find this package. * `longDescription`: add --- pkgs/data/misc/dtv-scan-tables/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/data/misc/dtv-scan-tables/default.nix b/pkgs/data/misc/dtv-scan-tables/default.nix index 4cbf43c144b2..0c53436f8e5f 100644 --- a/pkgs/data/misc/dtv-scan-tables/default.nix +++ b/pkgs/data/misc/dtv-scan-tables/default.nix @@ -26,9 +26,20 @@ stdenv.mkDerivation rec { allowedReferences = [ ]; meta = with lib; { - description = "Digital TV scan tables"; + description = "Digital TV (DVB) channel/transponder scan tables"; homepage = "https://github.com/tvheadend/dtv-scan-tables"; license = with licenses; [ gpl2Only lgpl21Only ]; + longDescription = '' + When scanning for dvb channels, + most applications require an initial set of + transponder coordinates (frequencies etc.). + These coordinates differ, depending of the + receiver's location or on the satellite. + The package delivers a collection of transponder + tables ready to be used by software like "dvbv5-scan". + The package at hand is maintained and used by tvheadend, + it is a fork of the original one hosted by linuxtv.org. + ''; maintainers = with maintainers; [ ]; }; } From 0a2b99bbc2cc727dcdacb3196df67114269565f1 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sat, 14 Jan 2023 12:49:17 +0100 Subject: [PATCH 4/5] dtv-scan-tables: rename to `dtv-scan-tables_tvheadend` This happens in preparation of the introduction of an alternate version, maintained by linuxtv. --- .../misc/dtv-scan-tables/{default.nix => tvheadend.nix} | 2 +- pkgs/top-level/all-packages.nix | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) rename pkgs/data/misc/dtv-scan-tables/{default.nix => tvheadend.nix} (97%) diff --git a/pkgs/data/misc/dtv-scan-tables/default.nix b/pkgs/data/misc/dtv-scan-tables/tvheadend.nix similarity index 97% rename from pkgs/data/misc/dtv-scan-tables/default.nix rename to pkgs/data/misc/dtv-scan-tables/tvheadend.nix index 0c53436f8e5f..b2edc34e5ea1 100644 --- a/pkgs/data/misc/dtv-scan-tables/default.nix +++ b/pkgs/data/misc/dtv-scan-tables/tvheadend.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { pname = "dtv-scan-tables"; - version = "20221027"; + version = "20221027-tvheadend"; src = fetchFromGitHub { owner = "tvheadend"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b78cb7e02726..0cf56a4936b1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -455,7 +455,7 @@ with pkgs; dsq = callPackage ../tools/misc/dsq { }; - dtv-scan-tables = callPackage ../data/misc/dtv-scan-tables { }; + dtv-scan-tables_tvheadend = callPackage ../data/misc/dtv-scan-tables/tvheadend.nix { }; dufs = callPackage ../servers/http/dufs { inherit (darwin.apple_sdk.frameworks) Security; @@ -37818,7 +37818,9 @@ with pkgs; tvbrowser-bin = callPackage ../applications/misc/tvbrowser/bin.nix { }; - tvheadend = callPackage ../servers/tvheadend { }; + tvheadend = callPackage ../servers/tvheadend { + dtv-scan-tables = dtv-scan-tables_tvheadend; + }; twiggy = callPackage ../development/tools/twiggy { }; From d425725ce32504d43aa8e411d56c2b766314b9df Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sat, 14 Jan 2023 13:23:31 +0100 Subject: [PATCH 5/5] dtv-scan-tables_linuxtv: init at 2022-04-30-57ed29822750 As this is the original repository of dtv scan tables, and is still actively maintained, it becomes the new default package for `dtv-scan-tables`. --- pkgs/data/misc/dtv-scan-tables/linuxtv.nix | 54 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/data/misc/dtv-scan-tables/linuxtv.nix diff --git a/pkgs/data/misc/dtv-scan-tables/linuxtv.nix b/pkgs/data/misc/dtv-scan-tables/linuxtv.nix new file mode 100644 index 000000000000..dcbf20c38e8d --- /dev/null +++ b/pkgs/data/misc/dtv-scan-tables/linuxtv.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchurl +, v4l-utils +}: + +let + + version_ = "2022-04-30-57ed29822750"; + +in + +stdenv.mkDerivation rec { + pname = "dtv-scan-tables"; + version = "${version_}-linuxtv"; + + src = fetchurl { + url = "https://linuxtv.org/downloads/${pname}/${pname}-${version_}.tar.bz2"; + hash = "sha256-amJoqjkkWTePo6E5IvwBWj+mP/gi9LDWTTPXE1Cm7J4="; + }; + + nativeBuildInputs = [ + v4l-utils + ]; + + sourceRoot = "usr/share/dvb"; + + makeFlags = [ + "PREFIX=$(out)" + ]; + + allowedReferences = [ ]; + + meta = with lib; { + # git repo with current revision is here: + #downloadPage = "https://git.linuxtv.org/dtv-scan-tables.git"; + # Weekly releases are supposed to be here + downloadPage = "https://linuxtv.org/downloads/dtv-scan-tables/"; + # but sometimes they lag behind several weeks or even months. + description = "Digital TV (DVB) channel/transponder scan tables"; + homepage = "https://www.linuxtv.org/wiki/index.php/Dtv-scan-tables"; + license = with licenses; [ gpl2Only lgpl21Only ]; + longDescription = '' + When scanning for dvb channels, + most applications require an initial set of + transponder coordinates (frequencies etc.). + These coordinates differ, depending of the + receiver's location or on the satellite. + The package delivers a collection of transponder + tables ready to be used by software like "dvbv5-scan". + ''; + maintainers = with maintainers; [ yarny ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0cf56a4936b1..822c98b306d3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -455,7 +455,9 @@ with pkgs; dsq = callPackage ../tools/misc/dsq { }; + dtv-scan-tables_linuxtv = callPackage ../data/misc/dtv-scan-tables/linuxtv.nix { }; dtv-scan-tables_tvheadend = callPackage ../data/misc/dtv-scan-tables/tvheadend.nix { }; + dtv-scan-tables = dtv-scan-tables_linuxtv; dufs = callPackage ../servers/http/dufs { inherit (darwin.apple_sdk.frameworks) Security;