Useful Snapcraft part definitions

Since the removal of the Remote (reusable) parts we lack a way to reuse and share part definitions, the new Snapcraft Extensions doesn’t quite fill in the gap either as it:

  • Requires one to be familiar with the Python programming language
  • Need to pass the code review of the Snapcraft project which is a much larger entry barrier than simply creating a yaml file in a Git repository that contains the part definitions.

This topic attempts to address the problem by serving as a central location to curate some of the Snapcraft part definitions that are considered to be useful for Snap packagers to reuse in order to:

  • Avoid rebuilding the wheels.
  • Improve snap quality overall as some part optimizations may be found that will benefit others(such as priming unnecessary files to reduce storage usage).

To use the part definitions, simply copy and paste them into the parts stanza of your snapcraft.yaml file. Some Snapcraft parts may require further modifications of the snapcraft.yaml to make use of the new part. If you find improvements that may benefit others, you’re encouraged to contribute back here :slight_smile: .

List of part definitions

Please create individual doc topic for each part definitions and add the link here. You should consider marking the topic as a wiki to allow other members to improve the definitions.

1 Like