HUB
Sign inSign up

skycoder42/sbx-kit-flutter-linux:latest

Multi-platform
Manifest digest

sha256:e0aecfa7036f5f3e736f65c7ca969f0dffaa379c36e79bd35dadf452082922c4

Last pushed

1 day by skycoder42

Type

Sandbox Kit

Manifest digest

sha256:e0aecfa7036f5f3e736f65c7ca969f0dffaa379c36e79bd35dadf452082922c4

yaml
schemaVersion: "3"
displayName: Flutter Linux desktop toolchain
author: Skycoder42
description: 'The native toolchain `flutter build linux` needs (clang, cmake, ninja, pkg-config, GTK 3 headers, xvfb), installed with apt when the sandbox is created. Declaration-only: it adds no layer and needs a Debian-based workload. Flutter and the related logo are trademarks of Google LLC. This kit is not endorsed by or affiliated with Google LLC.'
sourceUrl: https://github.com/Skycoder42/dart_test_tools/tree/main/sbx/flutter-linux
version: 1.0.0
licenses:
    - BSD-3-Clause
kind: mixin
provides:
    - [email protected]
requires:
    - flutter
capabilities:
    - type: com.docker.sandbox/network-policy@2
      config:
        install:
            allow:
                - deb.debian.org
                - dhi.io
    - type: com.docker.sandbox/lifecycle@1
      config:
        install:
            - command: |
                if ! command -v apt-get > /dev/null 2>&1; then
                  echo "flutter-linux: this kit needs a Debian-based workload with apt-get" >&2
                  exit 1
                fi
                export DEBIAN_FRONTEND=noninteractive
                apt-get update -qq
                apt-get install -y -qq --no-install-recommends \
                  clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev mesa-utils \
                  xvfb xauth
                rm -rf /var/lib/apt/lists/*
              description: Install the Flutter Linux desktop toolchain
              user: "0"
    - type: com.docker.sandbox/agent-context@1
      optional: true
      config:
        content: |
            ## Flutter Linux desktop

            The Linux desktop toolchain (clang, cmake, ninja, pkg-config, GTK 3) is
            installed, so `flutter build linux` works. The sandbox has no display: run
            the app or Linux integration tests under a virtual X server, e.g.
            `xvfb-run -a flutter test integration_test -d linux`.
    - type: com.docker.sandbox/agent-context@2
      optional: true
      config:
        content: |
            ## Flutter Linux desktop

            The Linux desktop toolchain (clang, cmake, ninja, pkg-config, GTK 3) is
            installed, so `flutter build linux` works. The sandbox has no display: run
            the app or Linux integration tests under a virtual X server, e.g.
            `xvfb-run -a flutter test integration_test -d linux`.