2023-12-17 15:46:03 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-01-01 12:28:18 +00:00
|
|
|
nixpkgs = {
|
|
|
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
};
|
|
|
|
flake-parts = {
|
|
|
|
url = "github:hercules-ci/flake-parts";
|
|
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
systems = {
|
|
|
|
url = "github:nix-systems/default";
|
|
|
|
};
|
2023-12-17 15:46:03 +00:00
|
|
|
};
|
|
|
|
|
2024-01-01 12:28:18 +00:00
|
|
|
outputs = inputs @ {
|
|
|
|
nixpkgs,
|
|
|
|
flake-parts,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
|
|
systems = import inputs.systems;
|
2023-12-17 15:46:03 +00:00
|
|
|
|
2024-01-01 12:28:18 +00:00
|
|
|
perSystem = {
|
|
|
|
pkgs,
|
|
|
|
system,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
devShells.default = pkgs.mkShell {packages = with pkgs; [marp-cli];};
|
2023-12-17 15:46:03 +00:00
|
|
|
|
|
|
|
packages.slides = pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
name = "slides";
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
dontUnpack = true;
|
2024-01-01 12:28:18 +00:00
|
|
|
buildInputs = with pkgs; [marp-cli];
|
2023-12-17 15:46:03 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
marp --html $src/slides.md --allow-local-files -o slides.html
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r $src/figs $out/figs
|
|
|
|
cp slides.html $out/index.html
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|