nixpkgs-suyu/pkgs/applications/video/mpv/wrapper.nix
2018-07-19 09:50:32 +02:00

14 lines
314 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) scripts}"
'';
}