Skip to content
Snippets Groups Projects
Verified Commit 5c0cce1e authored by Nádudvari Ákos's avatar Nádudvari Ákos
Browse files

fix: correctly display revision in document

parent 8faf0e97
No related branches found
No related tags found
No related merge requests found
Pipeline #2635 passed
......@@ -13,10 +13,10 @@
};
};
outputs = inputs@{ flake-parts, ... }:
outputs = inputs @ { self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
./nix/flake-module.nix
((import ./nix/flake-module.nix) self)
inputs.treefmt-nix.flakeModule
];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
......
{ lib, flake-parts-lib, ... }:
self: { lib, flake-parts-lib, ... }:
let
inherit (flake-parts-lib) mkPerSystemOption;
inherit (lib) types mkOption;
......@@ -42,7 +42,7 @@ in
mainFile = config.document.mainFile;
buildCommand = lib.getExe (pkgs.writeShellScriptBin "build-document" ''
BUILDDATE="$(TZ='Europe/Budapest' LC_TIME='hu_HU.UTF-8' date +'%Y. %b. %d. %T')"
BUILDCOMMIT="$(git rev-parse --short HEAD || echo '${ if (self' ? rev) then self'.rev else "<ismeretlen>"}')"
BUILDCOMMIT="$(git rev-parse --short HEAD || echo '${ if (self ? shortRev) then self.shortRev else "<ismeretlen>"}')"
VARS="\\def\\builddate{$BUILDDATE} \\def\\buildcommit{$BUILDCOMMIT}"
latexmk -interaction=nonstopmode -pdf -lualatex \
-outdir="./build" -synctex=1 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment