From c7c340e5a8db6a0478fd001cc787fc0d7c524a8d Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Thu, 6 Jul 2023 20:29:50 -0300 Subject: [PATCH] smplayer: refactor - New rec-less, overlay-style overridable recursive attributes (in effect since https://github.com/NixOS/nixpkgs/pull/119942); - remove `with lib;` - add `meta.changelog` - "update" TODO --- pkgs/applications/video/smplayer/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/video/smplayer/default.nix b/pkgs/applications/video/smplayer/default.nix index a26a72c24234..ba7992b97468 100644 --- a/pkgs/applications/video/smplayer/default.nix +++ b/pkgs/applications/video/smplayer/default.nix @@ -6,14 +6,14 @@ , wrapQtAppsHook }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "smplayer"; version = "23.6.0"; src = fetchFromGitHub { owner = "smplayer-dev"; - repo = pname; - rev = "v${version}"; + repo = "smplayer"; + rev = "v${finalAttrs.version}"; hash = "sha256-xGy6/9aUftBTSo9HJ3zyuRSagqimP9XvXKP/4oBQTo4="; }; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { "PREFIX=${placeholder "out"}" ]; - meta = with lib; { + meta = { homepage = "https://www.smplayer.info"; description = "A complete front-end for MPlayer"; longDescription = '' @@ -53,9 +53,10 @@ stdenv.mkDerivation rec { options of MPlayer, SMPlayer adds other interesting features like the possibility to play Youtube videos or download subtitles. ''; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.linux; + changelog = "https://github.com/smplayer-dev/smplayer/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.linux; }; -} -# TODO [ AndersonTorres ]: some form of wrapping mplayer/mpv around it +}) +# TODO [ AndersonTorres ]: create a wrapper including mplayer/mpv