54 lines
1.5 KiB
Nix
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-small
|
|
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 \
|
|
aner-zakobar-cv.tex
|
|
'';
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp aner-zakobar-cv.pdf $out/
|
|
'';
|
|
};
|
|
};
|
|
}
|