2023-11-26 22:44:13 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-12-14 14:09:20 +00:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
2023-11-26 22:44:13 +00:00
|
|
|
};
|
|
|
|
|
2023-12-14 14:09:20 +00:00
|
|
|
outputs = inputs@{ nixpkgs, flake-parts, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
|
|
|
|
perSystem = { pkgs, system, ... }: {
|
|
|
|
devShells.default =
|
|
|
|
pkgs.mkShell { packages = with pkgs; [ marp-cli ]; };
|
2023-11-26 22:44:13 +00:00
|
|
|
|
|
|
|
packages.slides = pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
name = "slides";
|
|
|
|
|
|
|
|
src = ./docs;
|
|
|
|
dontUnpack = true;
|
|
|
|
buildInputs = with pkgs; [ marp-cli ];
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
2023-12-14 14:09:20 +00:00
|
|
|
};
|
|
|
|
};
|
2023-11-26 22:44:13 +00:00
|
|
|
}
|
2023-12-14 14:09:20 +00:00
|
|
|
|