Files
resumes/flake.nix

71 lines
1.7 KiB
Nix
Raw Normal View History

2026-03-27 15:23:21 -04:00
{
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)
2026-03-27 15:49:41 -04:00
scheme-basic
2026-03-27 15:23:21 -04:00
preprint
titlesec
enumitem
sourcesanspro
fontawesome7
2026-03-27 15:49:41 -04:00
latexmk
marvosym
ly1
xkeyval
2026-03-27 15:23:21 -04:00
;
}
);
preCommitTool = if pkgs ? prek then pkgs.prek else pkgs.pre-commit;
2026-03-27 15:37:59 -04:00
resume_final_pdf = "Alice_Huston_Resume_Software_Engineer.pdf";
2026-03-27 15:23:21 -04:00
in
{
2026-03-27 15:37:59 -04:00
packages.default = pkgs.stdenvNoCC.mkDerivation {
pname = "resume-pdf";
version = "0.1.0";
src = pkgs.lib.cleanSource ./.;
nativeBuildInputs = [
tex
];
buildPhase = ''
runHook preBuild
2026-03-27 16:08:58 -04:00
latexmk -pdf -interaction=nonstopmode -halt-on-error resume.tex
2026-03-27 15:37:59 -04:00
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
'';
};
2026-03-27 15:23:21 -04:00
devShells.default = pkgs.mkShell {
packages = [
tex
pkgs.tex-fmt
preCommitTool
];
};
}
);
}