diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/video/vdr/wrapper.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/video/vdr/wrapper.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/video/vdr/wrapper.nix b/nixpkgs/pkgs/applications/video/vdr/wrapper.nix new file mode 100644 index 000000000000..04984212b249 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vdr/wrapper.nix @@ -0,0 +1,30 @@ +{ symlinkJoin, lib, makeWrapper, vdr +, plugins ? [] +}: let + + makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l); + + requiredXinePlugins = lib.flatten (map (p: p.passthru.requiredXinePlugins or []) plugins); + +in symlinkJoin { + + name = "vdr-with-plugins-${lib.getVersion vdr}"; + + paths = [ vdr ] ++ plugins; + + nativeBuildInputs = [ makeWrapper ]; + + postBuild = '' + wrapProgram $out/bin/vdr \ + --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \ + --prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins} + ''; + + meta = with vdr.meta; { + inherit license homepage; + description = description + + " (with plugins: " + + lib.concatStringsSep ", " (map (x: ""+x.name) plugins) + + ")"; + }; +} |