id: com.floatpane.matcha
runtime: org.freedesktop.Sdk
runtime-version: "23.08"
sdk: org.freedesktop.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.golang

command: matcha
finish-args:
  - --share=network
  - --share=ipc
  - --device=dri
  - --filesystem=home

modules:
  - name: matcha
    buildsystem: simple
    build-options:
      append-path: /usr/lib/sdk/golang/bin
      env:
        GOCACHE: /app/.cache/go-build
        GOPATH: /app/.go
      build-args:
        - --share=network
    build-commands:
      - go build -o /app/bin/matcha .
      - chmod -R u+w /app/.go /app/.cache
      - rm -rf /app/.go /app/.cache

    sources:
      - type: dir
        path: .
