nixpkgs/pkgs/applications/video/mpv/wrapper.nix
Doron Behar b0ac6a009b mpvScripts.mpris: use patch sent upstream for make DESTDIR=
Make sure mpris.so is stripped.
mpv-with-scripts: use a standard location for scripts in $out.
mpvScripts.convert: install to the new location of mpv scripts.
Replaced gobject-introspection dependency with glib.
2020-05-06 10:30:20 +03:00

15 lines
348 B
Nix

{ stdenv, symlinkJoin, makeWrapper, mpv, scripts ? [] }:
symlinkJoin {
name = "mpv-with-scripts-${mpv.version}";
paths = [ mpv ];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/mpv \
--add-flags "${stdenv.lib.concatMapStringsSep " " (x: "--script=${x}/share/mpv/scripts/${x.scriptName}") scripts}"
'';
}