1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-15 21:08:26 +00:00
flake-parts/site/flake-module.nix

23 lines
590 B
Nix
Raw Normal View History

2022-05-18 00:41:17 +02:00
{ ... }: {
perSystem = system: { config, self', inputs', pkgs, lib, ... }: {
packages.websitePackage = pkgs.stdenvNoCC.mkDerivation {
name = "site";
nativeBuildInputs = [ pkgs.pandoc ];
src = lib.cleanSourceWith {
filter = path: type:
path == ./.
|| baseNameOf path == "index.html";
src = ./.;
};
buildPhase = ''
pandoc --from docbook --to html5 \
${config.packages.optionsDocBook} >options.html
'';
installPhase = ''
mkdir -p $out
cp *.html $out/
'';
};
};
}