1
0
Fork 0
forked from Skynet/wiki
wiki/flake.nix
2024-08-26 20:02:59 +01:00

40 lines
974 B
Nix

{
description = "Skynet Wiki";
inputs = {
utils.url = "github:numtide/flake-utils";
alejandra.url = "github:kamadorueda/alejandra/3.0.0";
};
outputs = {
self,
nixpkgs,
utils,
alejandra,
}:
utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages."${system}";
in {
formatter = alejandra.defaultPackage.${system};
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
];
};
}
);
}