Merge pull request #119 from Mic92/docs

README: mention flake and --version=branch option
This commit is contained in:
figsoda 2022-12-15 12:53:56 -05:00 committed by GitHub
commit 018cd5fc0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,16 @@ nixpkgs or your own repository). Than run `nix-update` as follows
$ nix-update attribute [--version version]
```
If your package is defined in a flake use the `--flake` flag instead:
```console
$ nix-update attribute --flake [--version version]
```
`nix-update` will than try to update either the
`packages.{currentSystem}.{attribute}` or `{attribute}` output attribute of the
given flake.
This example will fetch the latest github release:
```console
@ -88,6 +98,8 @@ To only update sources hashes without updating the version:
$ nix-update --version=skip nixpkgs-review
```
Setting `--version` to `branch` instead, will look for the latest commit.
To extract version information from versions with prefixes or suffixes,
a regex can be used