Skip to content
Snippets Groups Projects
Unverified Commit 1747d02e authored by Anders Christiansen Sørby's avatar Anders Christiansen Sørby
Browse files

Add README documentation

parent d537bf81
No related branches found
No related tags found
No related merge requests found
......@@ -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:
### 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
First, complete the [basic Rust setup instructions](./doc/rust-setup.md).
......
......@@ -7,7 +7,7 @@ let
# gitignore.nix
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; });
......@@ -17,26 +17,26 @@ in
inherit pkgs src;
# provided by shell.nix
devTools = with pkgs; [
devTools = with pkgs; with pre-commit-hooks; [
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
];
# to be built by github actions
ci = {
# pre-commit-check = pre-commit-hooks.run {
# inherit src;
# hooks = {
# shellcheck.enable = true;
# nixpkgs-fmt.enable = true;
# nix-linter.enable = true;
# # cargo-check.enable = true;
# # rustfmt.enable = true;
# # clippy.enable = true;
# };
# # generated files
# excludes = [ "^nix/sources\.nix$" ];
# };
pre-commit-check = pre-commit-hooks.run {
inherit src;
hooks = {
shellcheck.enable = true;
nixpkgs-fmt.enable = true;
nix-linter.enable = true;
cargo-check.enable = true;
rustfmt.enable = true;
clippy.enable = true;
};
# generated files
excludes = [ "^nix/sources\.nix$" ];
};
};
}
......@@ -34,5 +34,17 @@
"type": "tarball",
"url": "https://github.com/mozilla/nixpkgs-mozilla/archive/8c007b60731c07dd7a052cce508de3bb1ae849b4.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"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment