Add README documentation

main
Anders Christiansen Sørby 2021-04-19 13:55:10 +02:00
parent d537bf8154
commit 1747d02e3b
No known key found for this signature in database
GPG Key ID: 1486C914F8AB79AA
3 changed files with 33 additions and 16 deletions

View File

@ -6,6 +6,11 @@ A fresh FRAME-based [Substrate](https://www.substrate.io/) node, ready for hacki
Follow these steps to get started with the Node Template :hammer_and_wrench: Follow these steps to get started with the Node Template :hammer_and_wrench:
### Using Nix
Install [nix](https://nixos.org/) and optionally [direnv](https://github.com/direnv/direnv) and [lorri](https://github.com/target/lorri) for a fully plug
and play experience for setting up the development environment. To get all the correct dependencies activate direnv `direnv allow` and lorri `lorri shell`.
### Rust Setup ### Rust Setup
First, complete the [basic Rust setup instructions](./doc/rust-setup.md). First, complete the [basic Rust setup instructions](./doc/rust-setup.md).

View File

@ -7,7 +7,7 @@ let
# gitignore.nix # gitignore.nix
gitignoreSource = (import sources."gitignore.nix" { inherit (pkgs) lib; }).gitignoreSource; gitignoreSource = (import sources."gitignore.nix" { inherit (pkgs) lib; }).gitignoreSource;
# pre-commit-hooks = (import sources."pre-commit-hooks.nix"); pre-commit-hooks = (import sources."pre-commit-hooks.nix");
rust = (import ./rust.nix { inherit sources; }); rust = (import ./rust.nix { inherit sources; });
@ -17,26 +17,26 @@ in
inherit pkgs src; inherit pkgs src;
# provided by shell.nix # provided by shell.nix
devTools = with pkgs; [ devTools = with pkgs; with pre-commit-hooks; [
niv wasm-pack wasmtime valgrind protobuf clang llvm rocksdb niv wasm-pack wasmtime valgrind protobuf clang llvm rocksdb
# inherit (pre-commit-hooks) pre-commit nixpkgs-fmt nix-linter; pre-commit nixpkgs-fmt nix-linter
rust rust
]; ];
# to be built by github actions # to be built by github actions
ci = { ci = {
# pre-commit-check = pre-commit-hooks.run { pre-commit-check = pre-commit-hooks.run {
# inherit src; inherit src;
# hooks = { hooks = {
# shellcheck.enable = true; shellcheck.enable = true;
# nixpkgs-fmt.enable = true; nixpkgs-fmt.enable = true;
# nix-linter.enable = true; nix-linter.enable = true;
# # cargo-check.enable = true; cargo-check.enable = true;
# # rustfmt.enable = true; rustfmt.enable = true;
# # clippy.enable = true; clippy.enable = true;
# }; };
# # generated files # generated files
# excludes = [ "^nix/sources\.nix$" ]; excludes = [ "^nix/sources\.nix$" ];
# }; };
}; };
} }

View File

@ -34,5 +34,17 @@
"type": "tarball", "type": "tarball",
"url": "https://github.com/mozilla/nixpkgs-mozilla/archive/8c007b60731c07dd7a052cce508de3bb1ae849b4.tar.gz", "url": "https://github.com/mozilla/nixpkgs-mozilla/archive/8c007b60731c07dd7a052cce508de3bb1ae849b4.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"pre-commit-hooks.nix": {
"branch": "master",
"description": "Seamless integration of https://pre-commit.com git hooks with Nix.",
"homepage": "",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "2d169bb1b23f3b71a894a66ea81f45c788943248",
"sha256": "1iyvi56rzszwizq0ymf1x262yhjwzk8k77qahb65fcync99jha2a",
"type": "tarball",
"url": "https://github.com/cachix/pre-commit-hooks.nix/archive/2d169bb1b23f3b71a894a66ea81f45c788943248.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
} }
} }