37 lines
898 B
Nix
37 lines
898 B
Nix
{
|
|
description = "Skynet Wiki";
|
|
|
|
inputs = {
|
|
utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils, }: utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages."${system}";
|
|
in {
|
|
defaultPackage = pkgs.stdenv.mkDerivation {
|
|
name = "skynet-wiki";
|
|
src = self;
|
|
buildInputs = [
|
|
pkgs.python3Packages.mkdocs
|
|
pkgs.python3Packages.mkdocs-material
|
|
];
|
|
buildPhase = "mkdocs build";
|
|
installPhase = "mkdir -p $out; cp -R site/* $out;";
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
name = "Skynet Wiki env";
|
|
packages = [
|
|
pkgs.python3Packages.mkdocs
|
|
pkgs.python3Packages.mkdocs-material
|
|
];
|
|
shellHook = ''
|
|
echo "Building wiki"
|
|
mkdocs build
|
|
mkdocs serve
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|