Build from source¶
ld-decode is built with Nix. The included flake provides a reproducible build and generates the version file automatically. You can build ld-decode from source on any platform that supports Nix.
Requirements¶
- Nix with flakes enabled
- Git
Clone the repository¶
First, clone the ld-decode repository and initialize submodules:
git clone https://github.com/happycube/ld-decode.git
cd ld-decode
git submodule update --init --recursive
Build¶
- Build the default package:
nix build
The build produces ./result with the installed package and CLI tools.
Run¶
- Run the main tool:
nix run- Or run a specific tool:
nix run .#ld-decodenix run .#ld-ldf-reader-py
Development shell¶
- Enter a dev shell with dependencies:
nix develop
Versioning¶
The flake generates a PEP 440 compliant version string and writes it to lddecode/version during the build. The CLI --version output comes from that file and includes git commit and dirty status when available.
Installation¶
The recommended installation method is via Nix flakes.
Requirements¶
- Nix with flakes enabled
Install and run¶
- Build and run the default package:
nix run
Install to your profile¶
- Install the package to your user profile:
nix profile install .
This provides the following commands on your PATH:
- ld-decode
- ld-ldf-reader-py
Verify installation¶
- Check versions:
ld-decode --versionld-ldf-reader-py --version
These commands report the version generated by the flake build.