-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(nix): add installation instructions for Nix (#669)
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
# Nix | ||
|
||
If you are using Nix, **git-cliff** can be installed from the [official latest staple channel][channel-link]. | ||
|
||
## Using nix-shell | ||
|
||
To temporarily install git-cliff in a shell environment, run: | ||
|
||
```sh | ||
nix-shell -p git-cliff | ||
``` | ||
|
||
## Using nix-env | ||
|
||
To install git-cliff permanently, use: | ||
|
||
```sh | ||
nix-env -iA nixpkgs.git-cliff | ||
``` | ||
|
||
> [!WARNING] | ||
> Using nix-env permanently modifies a local profile of installed packages. | ||
> This must be updated and maintained by the user in the same way as with a traditional package manager, | ||
> foregoing many of the benefits that make Nix uniquely powerful. | ||
> Using nix-shell or a NixOS configuration is recommended instead. | ||
|
||
## The new CLI | ||
|
||
If you're using the new experimental CLI, you can use any of the following: | ||
|
||
### `nix run | ||
```sh | ||
nix run nixpkgs#git-cliff | ||
``` | ||
|
||
### `nix shell` | ||
|
||
To open a new shell with git-cliff available, use: | ||
|
||
```sh | ||
nix shell nixpkgs#git-cliff | ||
``` | ||
|
||
## Using the Unstable Channel | ||
|
||
While new releases of **git-cliff** typically become available in the stable channel relatively quickly, you can use the unstable channel if you want to access the latest features and updates sooner. | ||
|
||
To add and update the unstable channel, run: | ||
|
||
```sh | ||
nix-channel --add https://nixos.org/channels/nixpkgs-unstable | ||
nix-channel --update nixpkgs | ||
``` | ||
|
||
After updating to the unstable channel, you can use any of the previous installation commands to install **git-cliff**. | ||
|
||
|
||
[channel-link]: https://search.nixos.org/packages?channel=24.05&show=git-cliff&from=0&size=50&sort=relevance&type=packages&query=git-cliff |