Commit 3e11c0c
committed
nh search: fix links and add github link
when you run a nh search <packagename> command, the output previously
looked like:
```
$ nh search fluffychat
Querying search.nixos.org, with channel nixos-unstable...
warning: Nix search path entry '/home/greg/.nix-defexpr/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
Took 120ms
Most relevant results at the end
fluffychat-web (2.0.0)
Chat with your friends (matrix client)
Homepage: https://fluffychat.im/
Defined at: pkgs/by-name/fl/fluffychat/package.nix
fluffychat (2.0.0)
Chat with your friends (matrix client)
Homepage: https://fluffychat.im/
Defined at: pkgs/by-name/fl/fluffychat/package.nix
```
And the "Defined at" links were broken on nix flake systems - they
pointed at a nonexistant file.
This commit fixes that broken link and also adds an additional link to
the file on the nixpkgs github repository:
```
$ cargo run -- search fluffychat
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/nh search fluffychat`
Querying search.nixos.org, with channel nixos-unstable...
Took 160ms
Most relevant results at the end
fluffychat-web (2.2.0)
Chat with your friends (matrix client)
Homepage: https://fluffychat.im/
Defined at: pkgs/by-name/fl/fluffychat/package.nix
Github link: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/fl/fluffychat/package.nix
fluffychat (2.2.0)
Chat with your friends (matrix client)
Homepage: https://fluffychat.im/
Defined at: pkgs/by-name/fl/fluffychat/package.nix
Github link: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/fl/fluffychat/package.nix
```1 parent 47374db commit 3e11c0c
2 files changed
+84
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
51 | 62 | | |
52 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
53 | 66 | | |
54 | 67 | | |
55 | 68 | | |
| |||
77 | 90 | | |
78 | 91 | | |
79 | 92 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
83 | 106 | | |
84 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
85 | 119 | | |
86 | 120 | | |
87 | 121 | | |
| |||
212 | 246 | | |
213 | 247 | | |
214 | 248 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 249 | | |
219 | 250 | | |
220 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
221 | 267 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 268 | + | |
227 | 269 | | |
228 | 270 | | |
229 | 271 | | |
| |||
246 | 288 | | |
247 | 289 | | |
248 | 290 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 291 | + | |
254 | 292 | | |
255 | 293 | | |
256 | 294 | | |
257 | 295 | | |
258 | 296 | | |
259 | 297 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
278 | 321 | | |
279 | 322 | | |
280 | 323 | | |
| |||
0 commit comments