wiki/flake.nix
Brendan Golden 00c08c4b1b
All checks were successful
Build / build (push) Successful in 8s
Build / deploy (push) Successful in 13s
feat: its a bodge but we should be able to use git commands in the build script now
2024-09-14 22:39:20 +01:00

41 lines
1.1 KiB
Nix

{
description = "Skynet Wiki";
inputs = {
utils.url = "github:numtide/flake-utils";
alejandra.url = "github:kamadorueda/alejandra";
};
outputs = {
self,
nixpkgs,
utils,
alejandra,
}:
utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages."${system}";
# find these here https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=python312Packages.mkdocs
packages = with pkgs.python3Packages; [
mkdocs
mkdocs-material
mkdocs-git-authors-plugin
mkdocs-git-revision-date-localized-plugin
];
in {
formatter = alejandra.defaultPackage.${system};
defaultPackage = pkgs.stdenv.mkDerivation {
name = "skynet-wiki";
src = self;
buildInputs = packages;
buildPhase = "mv _git .git && mkdocs build";
installPhase = "mkdir -p $out; cp -R site/* $out;";
};
devShells.default = pkgs.mkShell {
name = "Skynet Wiki env";
packages = packages;
};
}
);
}