diff --git a/cookiecutter.json b/cookiecutter.json index 05535d5..c47e6c8 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -11,6 +11,8 @@ "flatpak_runtime": "org.freedesktop.Platform", "flatpak_runtime_version": "21.08", "flatpak_sdk": "org.freedesktop.Sdk", + "finish_args": "", + "modules_extra_content": "", "python_version": "3.X.0", "_extensions": [ "briefcase.integrations.cookiecutter.PythonVersionExtension" diff --git a/{{ cookiecutter.format }}/manifest.yml b/{{ cookiecutter.format }}/manifest.yml index 32c5272..ad85785 100644 --- a/{{ cookiecutter.format }}/manifest.yml +++ b/{{ cookiecutter.format }}/manifest.yml @@ -8,24 +8,13 @@ cleanup: - /include - /share/man finish-args: - # X11 + XShm access - - --share=ipc - - --socket=x11 - # Disable Wayland access - - --nosocket=wayland - # Network access - - --share=network - # GPU access - - --device=dri - # Sound access - - --socket=pulseaudio - # Host filesystem access - - --filesystem=xdg-cache - - --filesystem=xdg-config - - --filesystem=xdg-data - - --filesystem=xdg-documents - # DBus access - - --socket=session-bus +{%- if cookiecutter.finish_args -%} + {%- for arg, enabled in cookiecutter.finish_args.items() -%} + {%- if enabled %} + - --{{ arg }} + {%- endif -%} + {%- endfor -%} +{%- endif %} modules: - name: cpython buildsystem: simple @@ -67,6 +56,7 @@ modules: - --share=network # For downloaded requirements. build-commands: - /app/bin/python3 -m pip install --upgrade pip +{{ cookiecutter.modules_extra_content }} - name: app_packages buildsystem: simple build-options: