| 1 | { lib, python3, gst_all_1, libnice, writeShellApplication }: |
| 2 | let |
| 3 | python = python3.withPackages (packages: [ packages.pygobject3 packages.gst-python ]); |
| 4 | plugins = (with gst_all_1; [ (lib.getLib gstreamer) gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-plugins-rs ]) ++ [ (lib.getLib libnice) ]; |
| 5 | source = lib.fileset.toSource { |
| 6 | root = ../.; |
| 7 | fileset = lib.fileset.unions [ ../tools/vm-screen.py ../tools/vm-rfb.py ../guest/protocol.json ]; |
| 8 | }; |
| 9 | in |
| 10 | writeShellApplication { |
| 11 | name = "snowglobe-vm-screen"; |
| 12 | runtimeEnv = { |
| 13 | GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPath "lib/gstreamer-1.0" plugins; |
| 14 | GI_TYPELIB_PATH = lib.makeSearchPath "lib/girepository-1.0" (map lib.getLib ([ gst_all_1.gstreamer ] ++ plugins)); |
| 15 | SNOWGLOBE_VM_GUEST_PROTOCOL = "${source}/guest/protocol.json"; |
| 16 | }; |
| 17 | text = ''exec ${python}/bin/python3 ${source}/tools/vm-screen.py''; |
| 18 | } |