mirror of
https://github.com/kmein/niveum
synced 2026-03-19 19:41:08 +01:00
feat: fix secrets permissions, move ./packages to flake outputs
This commit is contained in:
16
packages/mpv-tv.nix
Normal file
16
packages/mpv-tv.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
}: let
|
||||
streams-tsv = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u";
|
||||
sha256 = "sha256-gbHV37Yo+D3TYfDXZyb9IX8aRsguZ3qG2SYlY8NsTL0=";
|
||||
postFetch = ''
|
||||
${pkgs.gnused}/bin/sed '/#EXTM3U/d;/#EXTINF/s/.*,//g' $out | ${pkgs.coreutils}/bin/paste -d'\t' - - > $out.tmp
|
||||
mv $out.tmp $out
|
||||
'';
|
||||
};
|
||||
in
|
||||
pkgs.writers.writeDashBin "mpv-tv" ''
|
||||
exec ${pkgs.mpv}/bin/mpv --force-window=yes "$(${pkgs.dmenu}/bin/dmenu -i -l 5 < ${streams-tsv} | ${pkgs.coreutils}/bin/cut -f2)"
|
||||
''
|
||||
Reference in New Issue
Block a user