mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
mpvScripts.mpv-discord: init at 1.6.1 (#336301)
This commit is contained in:
commit
94930d463b
@ -111,6 +111,7 @@ let
|
||||
modernx-zydezu = callPackage ./modernx-zydezu.nix { };
|
||||
mpris = callPackage ./mpris.nix { };
|
||||
mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
|
||||
mpv-discord = callPackage ./mpv-discord.nix { };
|
||||
mpv-notify-send = callPackage ./mpv-notify-send.nix { };
|
||||
mpv-osc-modern = callPackage ./mpv-osc-modern.nix { };
|
||||
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
|
||||
|
44
pkgs/applications/video/mpv/scripts/mpv-discord.nix
Normal file
44
pkgs/applications/video/mpv/scripts/mpv-discord.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
buildLua,
|
||||
lib,
|
||||
}:
|
||||
let
|
||||
version = "1.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tnychn";
|
||||
repo = "mpv-discord";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-P1UaXGboOiqrXapfLzJI6IT3esNtflkQkcNXt4Umukc=";
|
||||
};
|
||||
|
||||
core = buildGoModule {
|
||||
name = "mpv-discord-core";
|
||||
inherit version;
|
||||
|
||||
src = "${src}/mpv-discord";
|
||||
|
||||
vendorHash = "sha256-xe1jyWFQUD+Z4qBAVQ0SBY0gdxmi5XG9t29n3f/WKDs=";
|
||||
};
|
||||
in
|
||||
buildLua {
|
||||
pname = "mpv-discord";
|
||||
inherit version src;
|
||||
|
||||
scriptPath = "scripts/discord.lua";
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/share/mpv/scripts/discord.lua \
|
||||
--replace-fail 'binary_path = ""' 'binary_path = "${core}/bin/mpv-discord"'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Cross-platform Discord Rich Presence integration for mpv with no external dependencies";
|
||||
homepage = "https://github.com/tnychn/mpv-discord";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ bddvlpr ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user