Update README: flakes are not enabled by default in Nix

main
staticvoid 2022-06-28 18:17:59 +03:00
parent 4f468cc80d
commit 72d6a08043
2 changed files with 16 additions and 5 deletions

View File

@ -1,7 +1,7 @@
## Features
- As on 27.06.22, all 3 (read-only) API endoints are available
- Username coloring: `4r` calculates hash of a username, takes 1st byte and uses it to color a username
- Username coloring: `4r` calculates hash of a username, takes 1st byte and uses it to color the username
- Markdown rendering
- Override location of your I2P router with `I2P_HTTP_PROXY` env variable.
@ -15,15 +15,14 @@
## Build
You need [Nix](https://nixos.org/download.html) installed to build this project.
You can use [this docker image](https://hub.docker.com/r/nixos/nix) to run build without installing Nix.
You need [Nix](https://nixos.org/download.html) installed to build this project. For advices on building in containers, see [Build in container](#build-in-container) section.
### Full build one-liner
```bash
git config --global http.http://git.community.i2p.proxy http://127.0.0.1:4444 && \
git clone http://git.community.i2p/staticvoid/4r.git && cd 4r && \
nix shell
nix --extra-experimental-features nix-command --extra-experimental-features flakes shell
```
After building (that took ~40min on 8-core machine) you'll have a shell with `4r` command available.
@ -95,3 +94,15 @@ Usual workflow:
> Но в преформатированном блоке ничего рендериться не должно, это нужно исправить
Попробую что-нибуть придумать
```
## Build in container
You can use [this docker image](https://hub.docker.com/r/nixos/nix) to run build without installing Nix.
You can temporary switch your I2P HTTP Proxy to listen on `192.168.*.*` address to be able to reach it from container.
If you did this, build one-liner becomes:
```bash
git config --global http.http://git.community.i2p.proxy http://<YOUR ADDRESS IN LOCAL NETWORK>:4444 && \
git clone http://git.community.i2p/staticvoid/4r.git && cd 4r && \
nix --extra-experimental-features nix-command --extra-experimental-features flakes shell
```

View File

@ -110,7 +110,7 @@ instance PrintColor ThreadPost where
, SetConsoleIntensity BoldIntensity
-- , SetSwapForegroundBackground True
] do
putTextO name
putTextO $ "@" <> name
withSgr [SetColor Foreground Dull White] do
putTextLnO $ " " <> date <> " #" <> show post_id
case commonmark "<message>" message of