Skip to content

Commit 16ef0b6

Browse files
committed
Update README.md to include cache chapter
Explains how to configure your project/local system in order to use Cachix/the local cache.
1 parent 671dce4 commit 16ef0b6

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,41 @@ You can also look through Adam Walker's excellent list of [prebuilt Clash circui
2323
# Nix
2424
This project exposes several Nix flake outputs. Most notably the `clash-cores` package, exposed individually or as an overlay (which you need to apply on top of clash-compiler).
2525

26+
## Usage
27+
2628
Contributing to `clash-cores` can be done via the developer shell exposed by the Nix flake. Open a terminal and type: `nix develop`. Optionally a specific GHC version can be selected as well as a `-minimal` or `-full` version. The `-minimal` shell does **NOT** contain the Haskell Language Server, whilst the `-full` shell does. When using the developer shell, do not forget to remove the `cabal.project` file. This file contains a package source and Cabal prioritizes local package sources over Nix sources. Removing the `cabal.project` file should work fine when developing with Nix.
2729

30+
Compiling Clash and all dependencies related to it may take a long time. To remidy long compilation times, you can make use of the publically available cache on Cachix:
31+
32+
### !! ADD CACHIX HELP !! ###
33+
34+
Cachix contains all commits on the main branch of `clash-cores` since the cache has been setup.
35+
36+
### QBayLogic
37+
38+
Employees working at QBayLogic also have access to a local binary cache, which contains every version of `clash-cores` (also those outside of the main branch). To access the local binary cache you can either add it to your `nix.conf` or on a project basis in the `flake.nix`.
39+
40+
`nix.conf`
41+
```conf
42+
extra-substituters = http://localhost:9200/public
43+
extra-trusted-public-keys = public:PGGlJMx1gGmU069blMqve8tS1ndzBuriUAwGBHGOo4g=
44+
```
45+
46+
`flake.nix`
47+
```nix
48+
{
49+
nixConfig = {
50+
extra-substituters = [ "http://localhost:9200/public" ];
51+
extra-trusted-public-keys = [ "public:PGGlJMx1gGmU069blMqve8tS1ndzBuriUAwGBHGOo4g=" ];
52+
};
53+
description = ...;
54+
inputs = ...;
55+
outputs = ...;
56+
}
57+
```
58+
59+
## As a dependency
60+
2861
You can also add this project as a Nix-dependency. This project depends on `clash-compiler`, the recommended way to add this to your project as a Nix dependency is as follows:
2962

3063
First add `clash-compiler` and `clash-cores` to your flake inputs:

0 commit comments

Comments
 (0)