mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
This commit adds a new workspace crate, version, which is consumed by komorebi and komorebic. If either of those binaries are being built by the Nix Flake, the git rev info will be pulled from inputs.self.rev instead of querying the git repo, because the git files are not passed to the derivation. The build.rs for the version crate decides if the build is happening by querying the shadow-rs build output for BRANCH, which will always be empty when a "nix build" is running. Cargo builds will use the standard git information retrieval mechanisms in shadow-rs. The information in both cases is exposed as version::LONG_VERSION, and passed to clap as the string to return when either binary is called with the --version flag.