2019-01-17 23:59:01 +03:00
|
|
|
# niv
|
|
|
|
|
2019-02-01 00:05:45 +03:00
|
|
|
[![CircleCI](https://circleci.com/gh/nmattia/niv.svg?style=svg)](https://circleci.com/gh/nmattia/niv)
|
|
|
|
|
2019-01-17 23:59:01 +03:00
|
|
|
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
|
2019-01-31 01:56:35 +03:00
|
|
|
show
|
2019-01-29 00:37:13 +03:00
|
|
|
update Update dependencies
|
|
|
|
drop Drop dependency
|
2019-01-31 01:56:35 +03:00
|
|
|
|
2019-01-29 00:37:13 +03:00
|
|
|
```
|
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-31 22:44:10 +03:00
|
|
|
Usage: niv add [-n|--name NAME] PACKAGE ([-a|--attribute KEY=VAL] |
|
|
|
|
[-b|--branch BRANCH] | [-o|--owner OWNER] | [-r|--repo REPO] |
|
|
|
|
[-v|--version VERSION] | [-t|--template URL])
|
2019-01-29 00:37:13 +03:00
|
|
|
Add dependency
|
2019-01-17 23:59:01 +03:00
|
|
|
|
2019-01-29 00:37:13 +03:00
|
|
|
Available options:
|
2019-01-31 22:44:10 +03:00
|
|
|
-n,--name NAME Set the package name to <NAME>
|
|
|
|
-a,--attribute KEY=VAL Set the package spec attribute <KEY> to <VAL>
|
|
|
|
-b,--branch BRANCH Equivalent to --attribute branch=<BRANCH>
|
|
|
|
-o,--owner OWNER Equivalent to --attribute owner=<OWNER>
|
|
|
|
-r,--repo REPO Equivalent to --attribute repo=<REPO>
|
|
|
|
-v,--version VERSION Equivalent to --attribute version=<VERSION>
|
2019-01-31 01:56:35 +03:00
|
|
|
-t,--template URL Used during 'update' when building URL. Occurrences
|
|
|
|
of <foo> are replaced with attribute 'foo'.
|
2019-01-29 00:37:13 +03:00
|
|
|
-h,--help Show this help text
|
2019-01-31 01:56:35 +03:00
|
|
|
|
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-31 22:44:10 +03:00
|
|
|
Usage: niv update [PACKAGE] ([-a|--attribute KEY=VAL] | [-b|--branch BRANCH] |
|
|
|
|
[-o|--owner OWNER] | [-r|--repo REPO] | [-v|--version VERSION]
|
|
|
|
| [-t|--template URL])
|
2019-01-29 00:37:13 +03:00
|
|
|
Update dependencies
|
2019-01-23 23:55:26 +03:00
|
|
|
|
2019-01-29 00:37:13 +03:00
|
|
|
Available options:
|
2019-01-31 22:44:10 +03:00
|
|
|
-a,--attribute KEY=VAL Set the package spec attribute <KEY> to <VAL>
|
|
|
|
-b,--branch BRANCH Equivalent to --attribute branch=<BRANCH>
|
|
|
|
-o,--owner OWNER Equivalent to --attribute owner=<OWNER>
|
|
|
|
-r,--repo REPO Equivalent to --attribute repo=<REPO>
|
|
|
|
-v,--version VERSION Equivalent to --attribute version=<VERSION>
|
2019-01-31 01:56:35 +03:00
|
|
|
-t,--template URL Used during 'update' when building URL. Occurrences
|
|
|
|
of <foo> are replaced with attribute 'foo'.
|
2019-01-29 00:37:13 +03:00
|
|
|
-h,--help Show this help text
|
2019-01-31 01:56:35 +03:00
|
|
|
|
2019-01-29 00:37:13 +03:00
|
|
|
```
|
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-31 01:56:35 +03:00
|
|
|
|
2019-01-29 00:37:13 +03:00
|
|
|
```
|
2019-01-17 23:59:01 +03:00
|
|
|
|
2019-01-18 00:01:09 +03:00
|
|
|
[Nix]: https://nixos.org/nix/
|