Enabled used of envvars to set placeholder values

This commit is contained in:
Alejandro Angulo 2022-12-10 08:32:16 -08:00
parent 1ec1de684c
commit 984c9ba0a7
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6

View file

@ -20,11 +20,10 @@
inherit (pkgs.texlive) scheme-full latex-bin latexmk; inherit (pkgs.texlive) scheme-full latex-bin latexmk;
}; };
vars = ["email" "phonenumber"]; vars = ["email" "phonenumber"];
# Create definitions like \def\email{1} # Create definitions like \def\email{$EMAIL}
# Each variable will be set to the command line argument at the # Each \email command in the tex document will be populated by an EMAIL
# variable's position (first arg passed to resume generator will fill # variable (can be set as an environment variable)
# in usages of \email in the tex flie) texvars = toString (pkgs.lib.concatMapStrings (x: ''\def\${x}{${"$" + pkgs.lib.toUpper x}}'') vars);
texvars = toString (pkgs.lib.imap1 (i: n: ''\def\${n}{${"$" + (toString i)}}'') vars);
in rec { in rec {
packages = { packages = {
alejandro-resume = pkgs.stdenvNoCC.mkDerivation rec { alejandro-resume = pkgs.stdenvNoCC.mkDerivation rec {