Resume/flake.nix

32 lines
916 B
Nix

{
description = "Price Hiller's Resume";
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};
in rec {
packages.default = pkgs.stdenvNoCC.mkDerivation {
name = "priceh-resume";
src = self;
buildInputs = [ pkgs.typst ];
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 ]; };
});
}