1
1
mirror of https://github.com/nmattia/niv.git synced 2024-09-18 19:07:19 +03:00
niv/README.md

95 lines
1.8 KiB
Markdown
Raw Normal View History

2019-01-17 23:59:01 +03:00
# niv
A tool for dealing with third-party packages in [Nix].
2019-01-18 01:00:48 +03:00
## Building
Inside the provided nix shell:
``` bash
$ # GHCi:
2019-01-23 23:55:26 +03:00
$ snack ghci
2019-01-29 00:37:13 +03:00
$ # run:
$ snack run -- <args>
2019-01-18 01:00:48 +03:00
```
2019-01-17 23:59:01 +03:00
## Usage
2019-01-29 00:37:13 +03:00
* [Add](#add)
* [Update](#update)
* [Drop](#drop)
2019-01-17 23:59:01 +03:00
2019-01-29 00:37:13 +03:00
```
NIV - Version manager for Nix projects
2019-01-24 23:58:22 +03:00
2019-01-29 00:37:13 +03:00
Usage: niv COMMAND
2019-01-24 23:58:22 +03:00
2019-01-29 00:37:13 +03:00
Available options:
-h,--help Show this help text
2019-01-24 23:58:22 +03:00
2019-01-29 00:37:13 +03:00
Available commands:
init Initialize a Nix project. Existing files won't be
modified.
add Add dependency
show
update Update dependencies
drop Drop dependency
```
2019-01-17 23:59:01 +03:00
2019-01-29 00:37:13 +03:00
### Add
2019-01-17 23:59:01 +03:00
```
2019-01-29 00:37:13 +03:00
Examples:
2019-01-17 23:59:01 +03:00
2019-01-29 00:37:13 +03:00
niv add stedolan/jq
niv add NixOS/nixpkgs-channel -n nixpkgs -b nixos-18.09
niv add my-package -v alpha-0.1 -t http://example.com/archive/<version>.zip
2019-01-17 23:59:01 +03:00
2019-01-29 00:37:13 +03:00
Usage: niv add PACKAGE ([-b|--branch BRANCH] | [-o|--owner OWNER] |
[-r|--repo REPO] | [-v|--version VERSION] |
[-a|--attribute KEY=VAL] | [-t|--template URL])
[-n|--name NAME]
Add dependency
2019-01-17 23:59:01 +03:00
2019-01-29 00:37:13 +03:00
Available options:
-t,--template URL foo
-h,--help Show this help text
2019-01-17 23:59:01 +03:00
```
2019-01-29 00:37:13 +03:00
### Update
2019-01-27 01:39:38 +03:00
2019-01-29 00:37:13 +03:00
```
Examples:
2019-01-23 23:55:26 +03:00
2019-01-29 00:37:13 +03:00
niv update
niv update nixpkgs
niv update my-package -v beta-0.2
2019-01-23 23:55:26 +03:00
2019-01-29 00:37:13 +03:00
Usage: niv update [PACKAGE] ([-b|--branch BRANCH] | [-o|--owner OWNER]
| [-r|--repo REPO] | [-v|--version VERSION] |
[-a|--attribute KEY=VAL] | [-t|--template URL])
Update dependencies
2019-01-23 23:55:26 +03:00
2019-01-29 00:37:13 +03:00
Available options:
-t,--template URL foo
-h,--help Show this help text
```
2019-01-23 23:55:26 +03:00
2019-01-29 00:37:13 +03:00
### Drop
2019-01-27 01:39:38 +03:00
2019-01-29 00:37:13 +03:00
```
Examples:
2019-01-27 01:39:38 +03:00
2019-01-29 00:37:13 +03:00
niv drop jq
2019-01-27 01:39:38 +03:00
2019-01-29 00:37:13 +03:00
Usage: niv drop PACKAGE
Drop dependency
2019-01-23 23:55:26 +03:00
2019-01-29 00:37:13 +03:00
Available options:
-h,--help Show this help text
```
2019-01-17 23:59:01 +03:00
2019-01-18 00:01:09 +03:00
[Nix]: https://nixos.org/nix/