Resume/flake.nix

33 lines
985 B
Nix

{
description = "Price Hiller's Resume";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
typst.url = "github:typst/typst";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, typst, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages.default = pkgs.stdenvNoCC.mkDerivation {
name = "priceh-resume";
src = self;
buildInputs = [ typst.packages.${system}.typst-dev ];
buildPhase = ''
ls -alh
typst compile ./resume.typ
'';
installPhase = ''
mkdir -p "$out"
rm -rf "$out/*" || true
cp resume.pdf $out/
'';
};
overlays.default = packages.default;
# Rust dev environment
devShells.default =
pkgs.mkShell { packages = with pkgs; [ typst typstfmt ]; };
});
}