32 lines
834 B
Nix
32 lines
834 B
Nix
{
|
|
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 = import nixpkgs { inherit system; };
|
|
in {
|
|
devShell = pkgs.mkShell { packages = with pkgs; [ marp-cli ]; };
|
|
|
|
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
|
|
'';
|
|
};
|
|
});
|
|
}
|