mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-31 04:27:45 +00:00
feat: dynamic versioning
This commit is contained in:
parent
d2709594da
commit
c671ef15fc
3 changed files with 10 additions and 5 deletions
|
@ -24,7 +24,12 @@
|
|||
nixpkgs.rustPlatform.buildRustPackage
|
||||
{
|
||||
pname = cargoToml.package.name;
|
||||
version = inputs.self.sourceInfo.rev;
|
||||
version =
|
||||
let
|
||||
commit = inputs.self.shortRev or "dirty";
|
||||
date = inputs.self.lastModifiedDate or inputs.self.lastModified or "19700101";
|
||||
in
|
||||
"${ builtins.substring 0 8 date }_${ commit }";
|
||||
src = inputs.self.sourceInfo;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
NIX_BUILD_CORES = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue