fix: get time and git revision from nix typst environment
This commit is contained in:
parent
8a64ae158c
commit
da7939855b
5 changed files with 33 additions and 8 deletions
1
.rev
Normal file
1
.rev
Normal file
|
@ -0,0 +1 @@
|
||||||
|
UNSTABLE_DO_NOT_USE
|
BIN
cv.pdf
BIN
cv.pdf
Binary file not shown.
4
cv.typ
4
cv.typ
|
@ -76,10 +76,6 @@
|
||||||
Nix and NixOS, Docker and NixOS based service deployment and system administration.
|
Nix and NixOS, Docker and NixOS based service deployment and system administration.
|
||||||
]
|
]
|
||||||
|
|
||||||
#cv-line[Other][
|
|
||||||
Git and Mercurial Version Control.
|
|
||||||
]
|
|
||||||
|
|
||||||
= Papers
|
= Papers
|
||||||
|
|
||||||
== Preprints
|
== Preprints
|
||||||
|
|
32
flake.nix
32
flake.nix
|
@ -54,11 +54,11 @@
|
||||||
dest = "icons";
|
dest = "icons";
|
||||||
src = "${inputs.font-awesome}/svgs/regular";
|
src = "${inputs.font-awesome}/svgs/regular";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
src = ./.rev;
|
||||||
|
dest = ".rev";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
XDG_CACHE_HOME = typstPackagesCache;
|
|
||||||
|
|
||||||
SOURCE_DATE_EPOCH = builtins.toString self.lastModified;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typstPackagesSrc = "${inputs.typst-packages}/packages";
|
typstPackagesSrc = "${inputs.typst-packages}/packages";
|
||||||
|
@ -79,6 +79,18 @@
|
||||||
commonArgs
|
commonArgs
|
||||||
// {
|
// {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
|
XDG_CACHE_HOME = typstPackagesCache;
|
||||||
|
|
||||||
|
SOURCE_DATE_EPOCH = builtins.toString self.lastModified;
|
||||||
|
|
||||||
|
preBuild =
|
||||||
|
if (self ? rev) then
|
||||||
|
''
|
||||||
|
echo ${self.rev} >> .rev
|
||||||
|
''
|
||||||
|
else
|
||||||
|
"";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -88,6 +100,18 @@
|
||||||
commonArgs
|
commonArgs
|
||||||
// {
|
// {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
|
XDG_CACHE_HOME = typstPackagesCache;
|
||||||
|
|
||||||
|
SOURCE_DATE_EPOCH = builtins.toString self.lastModified;
|
||||||
|
|
||||||
|
preBuild =
|
||||||
|
if (self ? rev) then
|
||||||
|
''
|
||||||
|
echo ${self.rev} >> .rev
|
||||||
|
''
|
||||||
|
else
|
||||||
|
"";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#import "@preview/fontawesome:0.5.0": *
|
#import "@preview/fontawesome:0.5.0": *
|
||||||
|
|
||||||
|
#let git_rev = read("./.rev", encoding: "utf8")
|
||||||
|
|
||||||
#let _cv-line(left, right, ..args) = {
|
#let _cv-line(left, right, ..args) = {
|
||||||
set block(below: 0pt)
|
set block(below: 0pt)
|
||||||
table(
|
table(
|
||||||
|
@ -144,6 +146,8 @@
|
||||||
#v(1fr, weak: false)
|
#v(1fr, weak: false)
|
||||||
#name\
|
#name\
|
||||||
#datetime.today().display("[month repr:long] [day], [year]")
|
#datetime.today().display("[month repr:long] [day], [year]")
|
||||||
|
|
||||||
|
#text(size: 8pt)[Built from revision #git_rev]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue