Files
komorebi/version/src
LGUG2Z db8cf858ff build(nix): pull git rev info from flake inputs
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.
2025-11-06 16:57:17 -08:00
..