diff options
| author | Charlie Moog <moogcharlie@gmail.com> | 2023-11-17 03:39:27 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-17 10:39:27 +0100 |
| commit | f6215cfdafdbbb63f85abeaf5e8948d8ab5717f3 (patch) | |
| tree | a51abb58ea45a833e1171bb9d554decb15027395 | |
| parent | 5aaaacbf472fc71295d4e4a26615d941a4d92a00 (diff) | |
nix: include git rev in build (#2688)
| -rw-r--r-- | flake.nix | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -10,7 +10,7 @@ systems.url = "github:nix-systems/default"; }; - outputs = inputs@{ flake-parts, crane, nixpkgs, ... }: flake-parts.lib.mkFlake { inherit inputs; } { + outputs = inputs@{ flake-parts, crane, nixpkgs, self, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = import inputs.systems; imports = [ @@ -72,6 +72,12 @@ ''; GEN_ARTIFACTS = "artifacts"; + TYPST_VERSION = + let + rev = self.shortRev or "dirty"; + version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).workspace.package.version; + in + "${version} (${rev})"; meta.mainProgram = "typst"; }); |
