Files
resumes/flake.nix
ahuston-0 abf1958c37
All checks were successful
Check flake.lock / Check health of `flake.lock` (push) Successful in 15s
Check Nix flake / Perform Nix flake checks (push) Successful in 45s
Build and Release Resume PDF / build (push) Successful in 6m57s
move resume workflow entirely to nix
2026-03-27 15:37:59 -04:00

71 lines
1.7 KiB
Nix

{
description = "Resume development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
tex = (
pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-medium
preprint
titlesec
enumitem
sourcesanspro
xifthen
ifmtarg
framed
paralist
fontawesome7
;
}
);
preCommitTool = if pkgs ? prek then pkgs.prek else pkgs.pre-commit;
resume_final_pdf = "Alice_Huston_Resume_Software_Engineer.pdf";
in
{
packages.default = pkgs.stdenvNoCC.mkDerivation {
pname = "resume-pdf";
version = "0.1.0";
src = pkgs.lib.cleanSource ./.;
nativeBuildInputs = [
tex
];
buildPhase = ''
runHook preBuild
latexmk -pdf -interaction=nonstopmode -halt-on-error main.tex
mv main.pdf ${resume_final_pdf}
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out"
install -m 0644 ${resume_final_pdf} "$out/${resume_final_pdf}"
runHook postInstall
'';
};
devShells.default = pkgs.mkShell {
packages = [
tex
pkgs.tex-fmt
preCommitTool
];
};
}
);
}