mpvScripts.mpv-discord: init at 1.6.1 (#336301)

authored by Artturin and committed by GitHub 94930d46 ed5e3c37

+45
+1
pkgs/applications/video/mpv/scripts/default.nix
··· 111 111 modernx-zydezu = callPackage ./modernx-zydezu.nix { }; 112 112 mpris = callPackage ./mpris.nix { }; 113 113 mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { }; 114 + mpv-discord = callPackage ./mpv-discord.nix { }; 114 115 mpv-notify-send = callPackage ./mpv-notify-send.nix { }; 115 116 mpv-osc-modern = callPackage ./mpv-osc-modern.nix { }; 116 117 mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
+44
pkgs/applications/video/mpv/scripts/mpv-discord.nix
··· 1 + { 2 + fetchFromGitHub, 3 + buildGoModule, 4 + buildLua, 5 + lib, 6 + }: 7 + let 8 + version = "1.6.1"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "tnychn"; 12 + repo = "mpv-discord"; 13 + rev = "v${version}"; 14 + hash = "sha256-P1UaXGboOiqrXapfLzJI6IT3esNtflkQkcNXt4Umukc="; 15 + }; 16 + 17 + core = buildGoModule { 18 + name = "mpv-discord-core"; 19 + inherit version; 20 + 21 + src = "${src}/mpv-discord"; 22 + 23 + vendorHash = "sha256-xe1jyWFQUD+Z4qBAVQ0SBY0gdxmi5XG9t29n3f/WKDs="; 24 + }; 25 + in 26 + buildLua { 27 + pname = "mpv-discord"; 28 + inherit version src; 29 + 30 + scriptPath = "scripts/discord.lua"; 31 + 32 + postInstall = '' 33 + substituteInPlace $out/share/mpv/scripts/discord.lua \ 34 + --replace-fail 'binary_path = ""' 'binary_path = "${core}/bin/mpv-discord"' 35 + ''; 36 + 37 + meta = { 38 + description = "Cross-platform Discord Rich Presence integration for mpv with no external dependencies"; 39 + homepage = "https://github.com/tnychn/mpv-discord"; 40 + license = lib.licenses.mit; 41 + platforms = lib.platforms.all; 42 + maintainers = with lib.maintainers; [ bddvlpr ]; 43 + }; 44 + }