|
| 1 | +# Build using `flatpak-builder --user --install --force-clean build-dir mu.codewith.Editor.yml`. |
| 2 | +# Then run using `flatpak run mu.codewith.Editor`. |
| 3 | + |
| 4 | +app-id: mu.codewith.Editor |
| 5 | + |
| 6 | +runtime: org.freedesktop.Platform |
| 7 | +runtime-version: '21.08' |
| 8 | +sdk: org.freedesktop.Sdk |
| 9 | + |
| 10 | +command: /app/python-build-standalone/install/bin/mu-editor |
| 11 | + |
| 12 | +finish-args: |
| 13 | + - --filesystem=home |
| 14 | + # X11/Wayland |
| 15 | + - --share=ipc |
| 16 | + - --socket=x11 |
| 17 | + - --socket=wayland |
| 18 | + - --device=dri |
| 19 | + - --socket=pulseaudio |
| 20 | + # Network access for Mu users |
| 21 | + - --share=network |
| 22 | + # MicroPython devices connect over USB |
| 23 | + - --device=all |
| 24 | + |
| 25 | +modules: |
| 26 | + # Use python-build-standalone since this is what `pup` uses for Windows and macOS. |
| 27 | + # This should make the builds more homogenous across platforms. |
| 28 | + - name: python-build-standalone |
| 29 | + buildsystem: simple |
| 30 | + build-options: |
| 31 | + build-args: |
| 32 | + - --share=network |
| 33 | + build-commands: |
| 34 | + - cp -pr . /app/python-build-standalone |
| 35 | + sources: |
| 36 | + - type: archive |
| 37 | + url: https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.8.13+20220630-x86_64-unknown-linux-gnu-lto-full.tar.zst |
| 38 | + sha256: 217fd3deccdc59e074800a2d90ea9176395d1630e1e24f84c062e6d5bf3e03a3 |
| 39 | + |
| 40 | + - name: mu |
| 41 | + buildsystem: simple |
| 42 | + build-options: |
| 43 | + build-args: |
| 44 | + - --share=network |
| 45 | + build-commands: |
| 46 | + - /app/python-build-standalone/install/bin/pip install --upgrade pip |
| 47 | + - /app/python-build-standalone/install/bin/pip install . |
| 48 | + - /app/python-build-standalone/install/bin/pip install pyserial |
| 49 | + # Prefetch wheels used in the user virtual environment. |
| 50 | + # Changes directory to `cd /tmp` in order to avoid importing `mu.wheels` |
| 51 | + # from the git repository. |
| 52 | + - cd /tmp && /app/python-build-standalone/install/bin/python3 -m mu.wheels |
| 53 | + sources: |
| 54 | + - type: archive |
| 55 | + url: https://github.com/mu-editor/mu/archive/refs/tags/v1.1.1.tar.gz |
| 56 | + sha256: 6ea06d09ba0ed15a2bdd87b62ad1c18a0b1edc7000956209720fcc4ad290458e |
| 57 | + |
| 58 | + - name: desktop-integration |
| 59 | + buildsystem: simple |
| 60 | + build-options: |
| 61 | + build-args: |
| 62 | + - --share=network |
| 63 | + build-commands: |
| 64 | + - install -Dm644 -t /app/share/applications mu.codewith.Editor.desktop |
| 65 | + - install -Dm644 -t /app/share/metainfo mu.codewith.Editor.appdata.xml |
| 66 | + - install -Dm644 -t /app/share/icons/hicolor/scalable/apps mu.codewith.Editor.svg |
| 67 | + sources: |
| 68 | + - type: file |
| 69 | + path: mu.codewith.Editor.desktop |
| 70 | + - type: file |
| 71 | + path: mu.codewith.Editor.appdata.xml |
| 72 | + - type: file |
| 73 | + path: mu.codewith.Editor.svg |
| 74 | + |
0 commit comments