wiki/flake.nix

40 lines
1 KiB
Nix
Raw Permalink Normal View History

{
description = "Skynet Wiki";
inputs = {
utils.url = "github:numtide/flake-utils";
alejandra.url = "github:kamadorueda/alejandra";
};
2024-08-26 19:02:59 +00:00
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
];
2024-08-26 19:02:59 +00:00
in {
formatter = alejandra.defaultPackage.${system};
defaultPackage = pkgs.stdenv.mkDerivation {
name = "skynet-wiki";
src = self;
buildInputs = packages;
2024-08-26 19:02:59 +00:00
buildPhase = "mkdocs build";
installPhase = "mkdir -p $out; cp -R site/* $out;";
};
2024-08-26 19:02:59 +00:00
devShells.default = pkgs.mkShell {
name = "Skynet Wiki env";
packages = packages;
2024-08-26 19:02:59 +00:00
};
}
);
2024-08-19 21:32:18 +00:00
}