diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7585238 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +book diff --git a/README.md b/README.md index 8c31595..afe8ea5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ # sinara-assembly -Repository with instructions and remarks on assembling and testing Sinara hardware \ No newline at end of file +Repository with instructions and remarks on assembling and testing Sinara hardware + +# Build docs + +```shell +nix build +``` + +The output files are in `result/book` directory. + +# Development shell + +```shell +nix develop +mdbook build +``` + +The output files are in `book` directory \ No newline at end of file diff --git a/book.toml b/book.toml new file mode 100644 index 0000000..47cd573 --- /dev/null +++ b/book.toml @@ -0,0 +1,6 @@ +[book] +authors = ["M-Labs Limited"] +language = "en" +multilingual = false +src = "src" +title = "Sinara Assembly" diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..cc1699c --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1675237434, + "narHash": "sha256-YoFR0vyEa1HXufLNIFgOGhIFMRnY6aZ0IepZF5cYemo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "285b3ff0660640575186a4086e1f8dc0df2874b5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..223af1d --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "Sinara assembly and test instructions"; + + inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11; + + outputs = { self, nixpkgs }: + + let pkgs = import nixpkgs { system = "x86_64-linux"; }; + + in { + packages.x86_64-linux.default = + # Notice the reference to nixpkgs here. + with import nixpkgs { system = "x86_64-linux"; }; + stdenv.mkDerivation { + name = "book"; + src = self; + buildInputs = with pkgs; [ pkgs.mdbook ]; + buildPhase = "mdbook build"; + installPhase = "mkdir -p $out/book; cp -R book $out/"; + }; + devShell.x86_64-linux = pkgs.mkShell { + name = "sinara-assembly-dev-shell"; + buildInputs = with pkgs; [pkgs.mdbook]; + }; + + }; +} diff --git a/src/SUMMARY.md b/src/SUMMARY.md new file mode 100644 index 0000000..7390c82 --- /dev/null +++ b/src/SUMMARY.md @@ -0,0 +1,3 @@ +# Summary + +- [Chapter 1](./chapter_1.md) diff --git a/src/chapter_1.md b/src/chapter_1.md new file mode 100644 index 0000000..b743fda --- /dev/null +++ b/src/chapter_1.md @@ -0,0 +1 @@ +# Chapter 1