manual-website/flake.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2023-10-23 10:12:21 +02:00
{
description = "iFSR Manual";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in
{
overlays.default = (_final: prev: {
inherit (self.packages.${prev.system}) ese-manual;
});
nixosModules.default = {
imports = [ ./module.nix ];
nixpkgs.overlays = [ self.overlays.default ];
};
packages = forAllSystems (system: rec {
default = ese-manual;
ese-manual = pkgs.${system}.stdenvNoCC.mkDerivation {
name = "ese-manual";
src = ./.;
buildInputs = with pkgs.${system}.python3Packages; [
mkdocs-material
];
# phases = [ "unpackPhase" "installPhase" ];
buildPhase = ''
mkdocs build
'';
installPhase = ''
mkdir -p $out
cp -r site/* $out
'';
};
});
};
}