mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(mpv): add visualizer
This commit is contained in:
@@ -1,12 +1,19 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
||||||
in {
|
in {
|
||||||
environment.shellAliases.smpv = swallow "mpv";
|
environment.shellAliases.smpv = swallow "mpv";
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
mpv = config.home-manager.users.me.programs.mpv.finalPackage;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -26,6 +33,7 @@ in {
|
|||||||
};
|
};
|
||||||
scripts = [
|
scripts = [
|
||||||
pkgs.mpvScripts.youtube-quality
|
pkgs.mpvScripts.youtube-quality
|
||||||
|
(pkgs.callPackage <niveum/packages/mpv-visualizer.nix> {})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
37
packages/mpv-visualizer.nix
Normal file
37
packages/mpv-visualizer.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenvNoCC,
|
||||||
|
fetchFromGitHub,
|
||||||
|
curl,
|
||||||
|
xclip,
|
||||||
|
}:
|
||||||
|
stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "visualizer";
|
||||||
|
version = "unstable-2021-07-10";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "mfcc64";
|
||||||
|
repo = "mpv-scripts";
|
||||||
|
rev = "a0cd87eeb974a4602c5d8086b4051b5ab72f42e1";
|
||||||
|
sha256 = "1xgd1nd117lpj3ppynhgaa5sbkfm7l8n6c9a2fy8p07is2dkndrq";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/share/mpv/scripts
|
||||||
|
cp visualizer.lua $out/share/mpv/scripts
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.scriptName = "visualizer.lua";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "various audio visualization";
|
||||||
|
homepage = "https://github.com/mfcc64/mpv-scripts";
|
||||||
|
license = licenses.unfree;
|
||||||
|
platforms = platforms.all;
|
||||||
|
maintainers = with maintainers; [kmein];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user