1
1
mirror of https://github.com/nmattia/niv.git synced 2024-09-18 19:07:19 +03:00
niv/README.tpl.md
2019-02-08 19:29:48 +01:00

1.3 KiB

niv

CircleCI

A tool for dealing with third-party packages in Nix. Read more about it in the usage section.

Install

$ nix-env -iA niv -f https://github.com/nmattia/niv/tarball/master

Build

Inside the provided nix shell:

$ # GHCi:
$ snack ghci
$ # run:
$ snack run -- <args>

Usage

niv simplifies adding and updating dependencies in Nix projects. It uses a single file, nix/sources.json, where it stores the data necessary for fetching and updating the packages.

  • Add: inserts a package in nix/sources.json.
  • Update: updates one or all packages in nix/sources.json.
  • Drop: deletes a package from nix/sources.json.

niv has two more utility functions:

  • Init: bootstraps a Nix projects, in particular creates a nix/sources.json file containing niv and nixpkgs as well as a nix/sources.nix file that returns the sources as a Nix object.
  • Show: shows the packages' information.
replace_niv_help

Add

replace_niv_add_help

Update

replace_niv_update_help

Drop

replace_niv_drop_help

Init

replace_niv_init_help

show

replace_niv_show_help