Convert ld-decode to a nix environment according to issue #1015#1016
Open
simoninns wants to merge 1 commit intohappycube:mainfrom
Open
Convert ld-decode to a nix environment according to issue #1015#1016simoninns wants to merge 1 commit intohappycube:mainfrom
simoninns wants to merge 1 commit intohappycube:mainfrom
Conversation
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.
This PR moves ld-decode to a nix based build system which greatly simplifies everything from build, integration and test (and even installation on Linux).
You will need to install nix in order to develop ld-decode - this is not a recommendation, it's a requirement. Once the repo is cloned you can:
"nix build" - this will create the nix environment from the flake definition and build the code
"nix develop" - this will make the current shell a nix environment (with all the right python stuff available from the flake definition)
This means that the development no longer needs complex CI involving a load of different python versions. All the build hooks and version inclusion scripts are removed - nix handles all of this. The actual CI is also a single nix action too - it will bring up the nix environment, build and then run all the ctests.
I've also greatly simplified the packaging actions as they were way too complex for a command line app. Windows produces a relocatable zip (just unzip and go) - Linux uses an appImage (more suitable for CLI than flatpaks) and MacOS has a DMG because that's all the second-class OS allows. All packages are generated on every commit (and stored as github artefacts for 30 days). On release tag all the packages will build and attach to the release (note: this last step isn't tested completely as it requires a tag in the main repo).
I've tested the packages on Fedora, Windows 11 and MacOS Tahoe 26.2
Overall this will make everything a lot simpler - no need for a target Linux distribution - no need for complex "apt get" or other dependency mess and no work when Ubuntu, Fedora or Arch release something new. As a lesser-bonus - if people want to use second-class unix-adjacent environments such as MacOS - nix works there too without having to be concerned if Linux building is affected (i.e. it increases the possible scope of contributors).