Files
cv/flake.nix
T
2025-09-11 15:27:37 +03:00

54 lines
1.5 KiB
Nix

{
#https://nix.dev/guides/recipes/python-environment.html
description = "Python development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-python.url = "github:cachix/nixpkgs-python";
};
outputs = { self, nixpkgs, nixpkgs-python }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
texPkgs = with pkgs.texlive; {
inherit (pkgs.texlive)
scheme-medium
latexmk
xetex
charter
soul
microtype
geometry
titlesec
enumitem
tex-gyre
fancyhdr;
};
in rec
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = [(pkgs.texlive.combine texPkgs)];
};
packages.${system}.default = pkgs.stdenvNoCC.mkDerivation rec {
name = "aner-cv";
src = self;
buildInputs = [ pkgs.coreutils (pkgs.texlive.combine texPkgs) ];
phases = ["unpackPhase" "buildPhase" "installPhase"];
buildPhase = ''
export PATH="${pkgs.lib.makeBinPath buildInputs}";
mkdir -p .cache/texmf-var
env TEXMFHOME=.cache TEXMFVAR=.cache/texmf-var \
latexmk -xelatex --interaction=nonstopmode \
cv-revised.tex
'';
installPhase = ''
mkdir -p $out
cp cv-revised.pdf $out/
'';
};
};
}