Files
nixpkgs/pkgs/by-name/mp/mpv-handler/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

50 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
makeWrapper,
mpv,
yt-dlp,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "mpv-handler";
version = "0.3.16";
src = fetchFromGitHub {
owner = "akiirui";
repo = "mpv-handler";
tag = "v${version}";
hash = "sha256-RpfHUVZmhtneeu8PIfxinYG3/groJPA9QveDSvzU6Zo=";
};
cargoHash = "sha256-FrE1PSRc7GTNUum05jNgKnzpDUc3FiS5CEM18It0lYY=";
passthru.updateScript = nix-update-script { };
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
install -Dm644 share/linux/mpv-handler.desktop -t $out/share/applications/
install -Dm644 share/linux/mpv-handler-debug.desktop -t $out/share/applications/
install -Dm644 share/linux/config.toml -t $out/share/doc/mpv-handler/
wrapProgram $out/bin/mpv-handler \
--prefix PATH : ${
lib.makeBinPath [
mpv
yt-dlp
]
}
'';
meta = {
description = "Play website videos and songs with mpv & yt-dlp";
homepage = "https://github.com/akiirui/mpv-handler";
mainProgram = "mpv-handler";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ lonerOrz ];
platforms = lib.platforms.linux;
};
}