Skip to content

Commit

Permalink
doc: Add nix documentation to developers guide
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephGoulden committed Oct 7, 2024
1 parent 76463be commit 93103ed
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions doc/developers-guide/developers-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,24 @@ Clean up the lightning directories:
destroy_ln
```



## Using Polar

[Polar](https://lightningpolar.com/) offers a one-click setup of Lightning Network for local app development & testing.

## Using Nix

Install [Nix](https://nixos.org/download/)

Update git submodules `git submodule update --init --recursive`.

The entry point is `flake.nix` in the root of the project, where the inputs and outputs are defined.

`nix develop` will create the default shell env with the build and runtime dependencies of the cln package. Then you can call `make` manually and the project will compile as usual.

`nix develop .#rust` will create a shell env for developing rust.

`nix build .?submodules=1` will build the default package (cln).

`nix flake check .?submodules=1` will build the cln and rust packages. Rust tests are run during the build. There are also checks to run cargo audit and nixfmt.

If you have nix installed you can use `nix run "git+https://github.com/hashrelay/lightning?ref=flake&submodules=1#lightningd"` to run lightningd without having to manually clone the repo. This make use of the flake output apps.

0 comments on commit 93103ed

Please sign in to comment.