diff --git a/flake.lock b/flake.lock index cb1c42c..e755d03 100644 --- a/flake.lock +++ b/flake.lock @@ -29,11 +29,11 @@ ] }, "locked": { - "lastModified": 1729712798, - "narHash": "sha256-a+Aakkb+amHw4biOZ0iMo8xYl37uUL48YEXIC5PYJ/8=", + "lastModified": 1729942962, + "narHash": "sha256-xzt7tb4YUw6VZXSCGw4sukirJSfYsIcFyvmhK5KMiKw=", "owner": "nix-community", "repo": "disko", - "rev": "09a776702b004fdf9c41a024e1299d575ee18a7d", + "rev": "58cd832497f9c87cb4889744b86aba4284fd0474", "type": "github" }, "original": { @@ -51,11 +51,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1729753754, - "narHash": "sha256-eOr9ZXL68i27i2Xd+UHM95OBUFCEClEvqMbEACsIFMg=", + "lastModified": 1729915395, + "narHash": "sha256-fD9q0wKTRyem5EYO7pt2FfgDUK/0bkR8Mitq2KaZxA0=", "owner": "rycee", "repo": "nur-expressions", - "rev": "88c24cff42f478f2d32685d4e2a7be246214294d", + "rev": "f4a24161dbb580dc91bc59dc54b2d81308a71610", "type": "gitlab" }, "original": { @@ -228,11 +228,11 @@ ] }, "locked": { - "lastModified": 1729716953, - "narHash": "sha256-FbRKGRRd0amsk/WS/UV9ukJ8jT1dZ2pJBISxkX+uq6A=", + "lastModified": 1729894599, + "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", "owner": "nix-community", "repo": "home-manager", - "rev": "a4353cc43d1b4dd6bdeacea90eb92a8b7b78a9d7", + "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", "type": "github" }, "original": { @@ -269,11 +269,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1729751760, - "narHash": "sha256-sJIYCzp0AyWeIFDUvrX8DpakEFIAnYgMQbIupqT0Um4=", + "lastModified": 1729921861, + "narHash": "sha256-lR1FS18NxY8XfYVxFSIAHCeJuTgbGUy7J79Bo0e9ZMA=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "899f84dd062dffc5dd912ba235e86be4855e5ffb", + "rev": "b0d86a65833bed4eda4d36ad54730a967bdca15a", "type": "github" }, "original": { @@ -289,11 +289,11 @@ ] }, "locked": { - "lastModified": 1729757100, - "narHash": "sha256-x+8uGaX66V5+fUBHY23Q/OQyibQ38nISzxgj7A7Jqds=", + "lastModified": 1729826725, + "narHash": "sha256-w3WNlYxqWYsuzm/jgFPyhncduoDNjot28aC8j39TW0U=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "04193f188e4144d7047f83ad1de81d6034d175cd", + "rev": "7840909b00fbd5a183008a6eb251ea307fe4a76e", "type": "github" }, "original": { @@ -413,11 +413,11 @@ ] }, "locked": { - "lastModified": 1729734515, - "narHash": "sha256-KGE6Exd1NAhTo806QUqK3oCk40L7spjfEpHnrNNkFD4=", + "lastModified": 1729907150, + "narHash": "sha256-8Hh+Gbm0G21gtEdowFN0pQuwoMnNflOhm4P7MQxf9jM=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "087ec37265ff1c8641086ee2a51450963494cdeb", + "rev": "5b2a08e28a23bd1b0e749aca0240d35405c7b019", "type": "github" }, "original": { @@ -624,11 +624,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1729775275, - "narHash": "sha256-J2vtHq9sw1wWm0aTMXpEEAzsVCUMZDTEe5kiBYccpLE=", + "lastModified": 1729931925, + "narHash": "sha256-3tjYImjVzsSM4sU+wTySF94Yop1spI/XomMBEpljKvQ=", "owner": "mic92", "repo": "sops-nix", - "rev": "78a0e634fc8981d6b564f08b6715c69a755c4c7d", + "rev": "b2211d1a537136cc1d0d5c0af391e8712016b34e", "type": "github" }, "original": { diff --git a/home-manager/personalities/desktop/default.nix b/home-manager/personalities/desktop/default.nix index dd60960..8aa20ef 100644 --- a/home-manager/personalities/desktop/default.nix +++ b/home-manager/personalities/desktop/default.nix @@ -27,5 +27,6 @@ winetricks lightworks_2023_02_02 shadps4 + yuki-iptv ]; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 8f2bc09..dec867c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,5 +6,5 @@ wayland-push-to-talk-fix = pkgs.callPackage ./wayland-push-to-talk-fix { }; discover-overlay = pkgs.python3Packages.callPackage ./discover-overlay { }; lightworks_2023_02_02 = pkgs.callPackage ./lightworks_2023_02_02 { }; - yuki-iptv = pkgs.callPackage ./yuki-iptv { }; + yuki-iptv = pkgs.python3Packages.callPackage ./yuki-iptv { }; } diff --git a/pkgs/yuki-iptv/default.nix b/pkgs/yuki-iptv/default.nix index c379775..1148e1a 100644 --- a/pkgs/yuki-iptv/default.nix +++ b/pkgs/yuki-iptv/default.nix @@ -1,54 +1,64 @@ { + bash, fetchurl, - python3, - stdenv, - mpv, ffmpeg, + gettext, + glib, + gobject-introspection, lib, - gettext + mpv-unwrapped, + python3, + stdenv }: stdenv.mkDerivation rec { pname = "yuki-iptv"; - version = "0.0.13"; + version = "0.0.15"; src = fetchurl { url = "https://codeberg.org/liya/yuki-iptv/archive/${version}.tar.gz"; - sha256 = "8d1858f8bcd5908f58daab2231ef6d0beb25e0003c6197e86ed39a32670e2308"; + sha256 = "sha256-8u8KoabExVqyj8ohGUl28SqIJYGfNLNl/tyHM9gwX88="; }; buildInputs = [ - python3 - mpv ffmpeg + mpv-unwrapped ]; nativeBuildInputs = [ - python3.pkgs.wrapPython gettext + python3.pkgs.wrapPython ]; pythonPath = with python3.pkgs; [ - pyqt6 - pillow + chardet pygobject3 - unidecode + pyqt6 + pyqt6-sip requests - chardet setproctitle + unidecode wand - sip ]; - preBuild = '' - # Replace version in About dialog - sed -i "s/__DEB_VERSION__/${version}/g" usr/lib/yuki-iptv/yuki-iptv.py + preFixup = '' + buildPythonPath "$out $pythonPath" + + wrapProgram $out/bin/yuki-iptv \ + --prefix PYTHONPATH : "$program_PYTHONPATH" \ + --set GI_TYPELIB_PATH "${glib.out}/lib/girepository-1.0:${gobject-introspection.out}/lib/girepository-1.0" \ ''; postPatch = '' substituteInPlace usr/lib/yuki-iptv/yuki-iptv.py \ --replace __DEB_VERSION__ ${version} + substituteInPlace usr/bin/yuki-iptv \ + --replace "#!/bin/sh" "#!${bash}/bin/sh" \ + --replace "python3" "${python3}/bin/python3" + + substituteInPlace usr/lib/yuki-iptv/thirdparty/mpv.py \ + --replace "ctypes.util.find_library('mpv')" "'${lib.makeLibraryPath [ mpv-unwrapped ]}/libmpv.so'" ''; installPhase = '' @@ -60,17 +70,10 @@ stdenv.mkDerivation rec { runHook postInstall ''; - preFixup = '' - buildPythonPath "$out $pythonPath" - - wrapProgram $out/bin/yuki-iptv \ - --prefix PYTHONPATH : "$program_PYTHONPATH" - ''; - meta = with lib; { description = "IPTV player with EPG support"; - license = licenses.gpl3; - platforms = platforms.all; + license = licenses.cc-by-40; + platforms = platforms.linux; homepage = "https://codeberg.org/liya/yuki-iptv"; }; }