You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-44Lines changed: 45 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,10 @@ Pipe your nix-build output through the nix-output-monitor (aka nom) to get addit
6
6
7
7
## Status
8
8
9
-
This is an experimental fun project. The purpose of it is to write something fun and useful in Haskell. You are free and very welcome to contribute feedback, issues or PRs, but I do not commit to maintain this project over a long time period.
10
-
This program relies on the output of the v1 nix commands (i.e. `nix-build` and not `nix build`) and will hopefully one day be obsolete.
11
-
12
-
Best case scenario: This could serve as inspiration as to how to improve nix output in the future.
9
+
This was an experimental fun project, which proofed to be useful to quite a lot of people.
10
+
The purpose of it is to write something fun and useful in Haskell.
11
+
You are free and very welcome to contribute feedback, issues or PRs, but I do not commit to maintain this project over a long time period.
12
+
This program relies on the output of the v1 nix commands (i.e. `nix-build` and not `nix build`) support for v2 output may come in the future.
13
13
14
14
## Installing
15
15
@@ -41,62 +41,63 @@ To preserve the color of the redirected text you can use the `unbuffer` command
41
41
unbuffer nix-build |& nom
42
42
```
43
43
44
-
## Icons / Legend
45
-
46
-
```Haskell
47
-
running ="▶"-- yellow, running builds
48
-
done ="✔"-- green, completed builds
49
-
todo ="⏳"-- blue, planned builds/downloads
50
-
down ="⬇"-- green, downloads (running and finished sadly in one number)
51
-
up ="⬆"-- green, uploads
52
-
warning ="⚠"-- failed build
53
-
goal ="🏁"-- the final build of the running command
54
-
average ="∅"-- a moving average over past builds of this derivation
55
-
bigsum ="∑"-- a summary over all packages and hosts
56
-
```
44
+
## Explanation
45
+
46
+
### Legend
47
+
48
+
Nom tries to convey informations via symbols and colors
49
+
50
+
* ▶, yellow: running builds
51
+
* ✔, green: completed builds
52
+
* ⏳︎︎︎, blue: planned builds
53
+
* ⬇, cyan: downloads often in the form `completed/total`
54
+
* ⬆, magenta: uploads
55
+
* ⚠, red: failed builds
56
+
* ∅: a moving average over past builds of this derivation
57
+
* ⏱︎: running time
58
+
* ∑: a summary over all packages and hosts
57
59
58
60
If you can‘t see all icons you maybe need another terminal font.
59
61
I recommend any font from `pkgs.nerdfonts` e.g. `"JetBrainsMono Nerd Font"`.
62
+
Also different terminals might work differently well. I recommend: `pkgs.foot`.
* nom will try to show you the most relevant part of the dependency tree, roughly aiming to fill a third of your terminal
69
+
* No build will be printed twice in the tree, it will only be shown for the lower most dependency.
70
+
* Everytime nom decides to not show all direct dependencies of a build (and for root nodes), it will print a `&` and a summary over the build state of all dependencies.
1. parsing (If you have suggestion for improving my parser combinators, I am all ears!)
76
-
2. updating state (with IO to look into the the nix store.)
77
-
3. printing
84
+
## Implementation
78
85
79
-
Right now it uses three sources of information:
86
+
Right now nom uses four sources of information:
80
87
81
88
1. The parsed nix-build output
82
89
2. it checks if build results exist in the nix-store
83
90
3. it querys `.drv` files for information about the `out` output path.
84
-
4. It caches build times in `~/.cache/nix-output-monitor/build-reports.csv`.
85
-
86
-
## Caveats
87
-
88
-
This will fail in unexpected and expected ways.
89
-
nix-output-monitor receives most it's information from parsing nix-build output. The parser might be to strict or to loose for use cases I didn‘t think of. Then **the numbers displayed will be off**!
90
-
91
-
Terminal clearing and reprinting is brittle. It might fail with your terminal or terminal width. But at this point I‘ve invested some effort to make it usable.
92
-
This program also makes assumptions like your nix-store is at "/nix/store" or that every derivation has an output at "out".
93
-
94
-
Luckily I don‘t think this program screws up anything more than your terminal.
91
+
4. It caches build times in `$XDG_CACHE_HOME/nix-output-monitor/build-reports.csv`.
95
92
96
-
## Strengths
93
+
## Limitations
97
94
98
-
The biggest strength of nom are ovbiously the colorful unicode symbols! (If you don‘t agree I accept PRs to making that configurable.)
95
+
* This will fail in unexpected and expected ways.
96
+
* nix-output-monitor receives most it's information from parsing nix-build output. The parser might be to strict or to loose for use cases I didn‘t think of. Then **the numbers displayed will be off**!
97
+
* nix-build does not show info when a download or upload is finished, so we currently cannot differentiate between started and completed downloads.
98
+
* remote builds will sometimes be shown as running even when they are actually still waiting for uploads or downloads.
99
99
100
-
nom ignores any output it doesn‘t recognize and will always print out everything it receives. So you can never loose information (besides coloring of nix output).
100
+
* Terminal clearing and reprinting is brittle. It might fail with your terminal or terminal width. But at this point I‘ve invested some effort to make it usable.
101
+
* This program also makes assumptions like your nix-store is at "/nix/store" or that every derivation has an output at "out".
101
102
102
-
nom does not assume that you run exactly one nix-build. If you run e.g. a script running multiple builds it will aggregate the information of all of them.
103
+
* Luckily I don‘t think this program screws up anything more than your terminal.
0 commit comments