Skip to content

Commit

Permalink
docs: add mdbook package
Browse files Browse the repository at this point in the history
  • Loading branch information
ttak0422 committed Jan 20, 2024
1 parent a22a032 commit 95e1fca
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
16 changes: 16 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-filter.url = "github:numtide/nix-filter";
};

outputs = inputs@{ flake-parts, crane, pre-commit-hooks, ... }:
Expand All @@ -39,7 +40,6 @@
vim =
importApply ./nix/vim-flake-module.nix { inherit withSystem; };
};

in {
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
perSystem = { self', system, pkgs, lib, ... }:
Expand All @@ -50,16 +50,27 @@
bundler-vim;
inherit (import ./nix/bundler-nvim.nix { inherit pkgs; })
bundler-nvim;

in {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = with inputs; [ fenix.overlays.default ];
overlays = with inputs; [
fenix.overlays.default
nix-filter.overlays.default
];
};
packages = {
bundler = bundler.package;
bundler-vim = bundler-vim.package;
bundler-nvim = bundler-nvim.package;
mdbook = let
inherit (pkgs) nix-filter;
src = nix-filter {
root = ./.;
include = [ ./docs ./book.toml (nix-filter.matchExt "md") ];
};
in pkgs.runCommand "mdbook" { } ''
${pkgs.mdbook}/bin/mdbook build --dest-dir $out ${src}
'';
};
checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
Expand Down

0 comments on commit 95e1fca

Please sign in to comment.