mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
25 lines
810 B
Nix
25 lines
810 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
}: let
|
|
m3u-to-tsv = ''
|
|
${pkgs.gnused}/bin/sed '/#EXTM3U/d;/#EXTINF/s/.*,//g' $out | ${pkgs.coreutils}/bin/paste -d'\t' - - > $out.tmp
|
|
mv $out.tmp $out
|
|
'';
|
|
|
|
live-tv = pkgs.fetchurl {
|
|
url = "https://raw.githubusercontent.com/Free-TV/IPTV/master/playlist.m3u8";
|
|
sha256 = "sha256-yNeML586RXXX5+VUtinH1C9M50hvnJih7oLmsVspk0M=";
|
|
postFetch = m3u-to-tsv;
|
|
};
|
|
|
|
kodi-tv = pkgs.fetchurl {
|
|
url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u";
|
|
sha256 = "sha256-EZEshHWUejLTy6qsBhELfaYdDpQ/uqPsZa1JA0mb7h0=";
|
|
postFetch = m3u-to-tsv;
|
|
};
|
|
in
|
|
pkgs.writers.writeDashBin "mpv-tv" ''
|
|
cat ${kodi-tv} ${live-tv} | ${pkgs.mpv}/bin/mpv --force-window=yes "$(${pkgs.dmenu}/bin/dmenu -i -l 5 | ${pkgs.coreutils}/bin/cut -f2)"
|
|
''
|