Skip to content

Commit b18595c

Browse files
authored
use symlink for lix-forecast command & document (#74)
2 parents c90dec0 + 55a2979 commit b18595c

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Cargo.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ tracing-subscriber = { version = "0.3" }
3434
clap = { version = "4.5", features = ["derive"] }
3535
clap_complete = "4.5"
3636

37-
[[bin]]
38-
name = "nix-forecast"
39-
path = "src/main.rs"
40-
41-
[[bin]]
42-
name = "lix-forecast"
43-
path = "src/main.rs"
44-
4537
[lints.clippy]
4638
cargo = "warn"
4739
complexity = "warn"

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ nix-forecast -c ".#nixosConfigurations.myMachine"
5353
nix-forecast -c ".#darwinConfigurations.myMac"
5454
```
5555

56+
### As a Lix subcommand
57+
58+
> [!NOTE]
59+
> Requires Lix >= 2.93
60+
61+
```sh
62+
lix forecast nixpkgs#hello
63+
```
64+
5665
## Why?
5766

5867
Finding out if paths are cached can be a bit troublesome in Nix, with commands like `nix build --dry-run`

nix/package.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ rustPlatform.buildRustPackage rec {
4545
--bash completions/nix-forecast.bash \
4646
--fish completions/nix-forecast.fish \
4747
--zsh completions/_nix-forecast
48+
49+
ln -s $out/bin/{n,l}ix-forecast
4850
'';
4951

5052
env = {

0 commit comments

Comments
 (0)