1
0
Fork 0

Init MDBook and Nix

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2023-02-03 16:55:09 +08:00
parent 5147347f9c
commit 7c0d5bd858
7 changed files with 83 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
book

View File

@ -1,3 +1,20 @@
# sinara-assembly
Repository with instructions and remarks on assembling and testing Sinara hardware
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

6
book.toml Normal file
View File

@ -0,0 +1,6 @@
[book]
authors = ["M-Labs Limited"]
language = "en"
multilingual = false
src = "src"
title = "Sinara Assembly"

27
flake.lock Normal file
View File

@ -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
}

27
flake.nix Normal file
View File

@ -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];
};
};
}

3
src/SUMMARY.md Normal file
View File

@ -0,0 +1,3 @@
# Summary
- [Chapter 1](./chapter_1.md)

1
src/chapter_1.md Normal file
View File

@ -0,0 +1 @@
# Chapter 1