44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{
|
|
description = "Build my CV";
|
|
|
|
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 = nixpkgs.legacyPackages.${system};
|
|
out_name = "CV_KonstantinFickel_SoftwareEngineer.pdf";
|
|
|
|
cv = pkgs.stdenv.mkDerivation {
|
|
name = "cv";
|
|
src = ./.;
|
|
buildInputs = [pkgs.python312Packages.weasyprint];
|
|
buildPhase = ''
|
|
${pkgs.python312Packages.weasyprint}/bin/weasyprint cv.html ${out_name}
|
|
'';
|
|
installPhase = ''
|
|
mkdir $out
|
|
mv ./${out_name} $out
|
|
'';
|
|
};
|
|
in
|
|
{
|
|
packages = {
|
|
inherit cv;
|
|
default = cv;
|
|
};
|
|
|
|
devShells = {
|
|
default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
python312Packages.weasyprint
|
|
];
|
|
};
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|