projet-intelligence-artific.../flake.nix

32 lines
834 B
Nix
Raw Normal View History

2023-11-26 22:44:13 +00:00
{
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
'';
};
});
}