Open
Conversation
Build `audible-cli` via nix _including_ all plugins! Added necessary code to create an AppImage for Linux + docker images via nix. Also add GitHub action logic to check whether the package continues to build via nix, including the AppImage and docker image. Currently limiting support to Linux x86, as this is the only local machine.
Take advantage of the TOML-like structure of `_version.py` file to easily parse the given version string for the nix package version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
audible-clivia nix including all plugins!Trying out nix
On a Linux x86 machine, install
nixvia the upstream installer and enable flake support or use the more popular nix-installer from DeterminateSystems that enables flake support out-of-the-box (recommended).Move to the repository and build the desired artefact via:
One can check the available packages via
nix flake showand those under thepackagesentry:On an
x86_64-linuxhost, the system can be skipped, so to buildaudible-cli-AppImagerunnix build .#audible-cli-AppImage.All build outputs will be located locally inside of the repository with the name
resultand symbolically linked to the output path in thenix store.AppImage
The resulting AppImage can then be used on all x86-Linux systems independent of the Distro (see #208). Even on systems with much older glibc versions thanks to the amazing work of ralismark in nix-appimage.
Docker
With little changes, the nix output can also be used to create a LayeredDocker image (see the nix-docker-or-both blog post from numtide and Nix is a better Docker image builder than Docker's image builder from xeiaso for details).
The OCI-Container can be built and executed via
Plugins
All packages (
audible-cli-full,audible-cli-docker,audible-cli-AppImage) include all plugins exceptaudible-cli, which includes none.Though, it is trivial to pick-and-choose which plugins should be included included by default if desired.
For the decrypt plugin
ffmpeg-7-headlessis used.Automation
I have also included a GitHub action automation that ensures that all nix artefacts can be build, that the nix source code is formatted correctly, and that the AppImage can be executed on the
ubunturunner.It also includes an automation that will add the
AppImageto the GitHub release assets section (see https://github.com/kai-tub/audible-cli-appimage/releases/tag/audible-cli-b3adb9 for example).TODO