2023-01-28 20:49:10 +00:00
|
|
|
self:
|
|
|
|
with self;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "psos-docs";
|
|
|
|
version = "0.0.1";
|
|
|
|
buildInputs = [
|
|
|
|
mdbook
|
|
|
|
mdbook-pdf
|
|
|
|
];
|
2022-08-14 16:03:32 +00:00
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
src = ../docs/..; # wut
|
2022-08-14 16:03:32 +00:00
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
phases = [
|
|
|
|
"buildPhase"
|
|
|
|
"installPhase"
|
|
|
|
];
|
2022-08-14 16:03:32 +00:00
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
buildPhase = ''
|
|
|
|
cp -r $src/doc ./doc
|
|
|
|
cp $src/README.md ./README.md
|
|
|
|
chmod ug+w -R .
|
|
|
|
ls -la .
|
|
|
|
mdbook build doc
|
|
|
|
'';
|
2022-08-14 16:03:32 +00:00
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/
|
|
|
|
cp -r doc/book $out/lib/html
|
|
|
|
'';
|
|
|
|
}
|