diff --git a/docs/src/introduction.md b/docs/src/introduction.md index daba5b6b..13af5e0c 100644 --- a/docs/src/introduction.md +++ b/docs/src/introduction.md @@ -49,9 +49,9 @@ To work with Rustemo a usual sequence of steps is as follows (after installing 1. Write a grammar in a textual file with `.rustemo` extension. For example, a JSON grammar might look like this (see the examples directory): - ``` - {{#include ../../examples/json/src/json.rustemo}} - ``` +``` +{{#include ../../examples/json/src/json.rustemo}} +``` 2. Run `rcomp` compiler (a binary installed from `rustemo-compiler` crate) with the given grammar to produce the parser code and optional builder actions diff --git a/flake.lock b/flake.lock index 7a4e68a4..a80a6b75 100644 --- a/flake.lock +++ b/flake.lock @@ -36,23 +36,6 @@ "type": "github" } }, - "mdbook": { - "flake": false, - "locked": { - "lastModified": 1676041770, - "narHash": "sha256-nMDj2b8SE96P/uOyv4RMN36U/1t8O7UFufOjwQPqMOA=", - "owner": "igordejanovic", - "repo": "mdbook", - "rev": "68e2bafbc4a88754e7412103e0007ea667380012", - "type": "github" - }, - "original": { - "owner": "igordejanovic", - "ref": "merged-prs", - "repo": "mdbook", - "type": "github" - } - }, "mdbook-theme": { "flake": false, "locked": { @@ -104,7 +87,6 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "mdbook": "mdbook", "mdbook-theme": "mdbook-theme", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" diff --git a/flake.nix b/flake.nix index 4fd927aa..603677a2 100644 --- a/flake.nix +++ b/flake.nix @@ -8,16 +8,9 @@ url = "github:zjp-CN/mdbook-theme"; flake = false; }; - # mdbook with fixes. - # Current fixes: - # - https://github.com/rust-lang/mdBook/pull/1718 - mdbook = { - url = "github:igordejanovic/mdbook?ref=merged-prs"; - flake = false; - }; }; - outputs = { self, nixpkgs, flake-utils, rust-overlay, mdbook-theme, mdbook }: + outputs = { self, nixpkgs, flake-utils, rust-overlay, mdbook-theme}: flake-utils.lib.eachDefaultSystem (system: let overlays = [ (import rust-overlay) ]; @@ -33,20 +26,13 @@ src = mdbook-theme; }; - mdbook-pkg = pkgs.rustPlatform.buildRustPackage { - pname = "mdbook"; - version = "0.4.26.fix"; - cargoLock.lockFile = mdbook.outPath + "/Cargo.lock"; - src = mdbook; - }; - tex = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small standalone qtree pict2e preview; }; buildInputsDocs = with pkgs; [ wget git bash - mdbook-pkg mdbook-admonish mdbook-plantuml + mdbook mdbook-admonish mdbook-plantuml mdbook-graphviz mdbook-theme-pkg mdbook-linkcheck plantuml graphviz tex poppler_utils]; @@ -62,12 +48,10 @@ buildInputs = buildInputsDocs; buildPhase = '' - cd docs - ./build-latex-images.sh - mdbook build + mdbook build docs ''; installPhase = '' - mv book $out + mv docs/book $out ''; }; }