This launcher that fixes libmagic file type autodetection compatibility in snaps.
How to use
-
Merge the following part definition to your Snapcraft recipe:
parts: # Launcher for fixing libmagic applications # https://forum.snapcraft.io/t/the-magic-launch-launcher-fix-file-type-detection-based-on-libmagic-in-the-snap-runtime/10442 magic-launch: source: https://github.com/Lin-Buo-Ren/magic-launch.git source-tag: v2.0.0 plugin: dump stage: - bin/*
-
In the
apps
stanza, insertbin/magic-launch
into the command chain:apps: _app_name_: # The command to run the application, the value should be a # *relative path* to an executable file rooted from the `prime` directory command: bin/magic-launch "${SNAP}"/bin/_app_command_
if you’re using the
full
adapter:apps: _app_name_: # The environment adapter style to use, `command-chain` is only supported # by the `full` adapter adapter: full # The command to run the application, the value should be a # *relative path* to an executable file rooted from the `prime` directory command: bin/_app_command_ command-chain: - bin/magic-launch
The implementation
Snaps that use this stage snap
References
file(1)
manual page
Happy snapcrafting!