canonical / action-build

A Github action for building Snapcraft projects
MIT License
42 stars 22 forks source link

How to install packages inside the lxc containers? #48

Closed jyotirmoy-paul closed 1 year ago

jyotirmoy-paul commented 1 year ago

I am trying to build a snap from a Flutter app. I have used the audioplayers package which needs gstreamer library while building for linux.

They have a definative guide for installing the required dependencies here.

But my question is, how can I run those commands inside the linux containers before building the app? If someone can give an idea, that would be extremely helpful.

For more context, this is one of the job which is failing because of the No package 'gstreamer-1.0' found error. Thanks a lot!

jyotirmoy-paul commented 1 year ago

I got the solution, I just needed to add the dependencies in the build-packages section, that would install them inside the linux container


parts:
  planets-puzzle:
    build-packages: [libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev]
    source: .
    plugin: flutter
    flutter-target: lib/main.dart```

Thanks!