hnix/README.md

64 lines
1.7 KiB
Markdown
Raw Normal View History

# hnix
2018-04-03 09:33:30 +02:00
Haskell parser, evaluator and type checker for the Nix language.
## Prerequisites
2018-04-05 00:05:58 +02:00
Nix is installed and in your `$PATH`. This is so that `nix-store` can be used
for interacting with store paths, until `hnix-store` is ready.
## Getting Started
```bash
2018-04-13 06:12:31 +02:00
$ git clone --recursive https://github.com/jwiegley/hnix.git
...
$ cd hnix
$ nix-shell
$ cabal configure --enable-tests
$ cabal build
$ cabal test
2018-04-12 19:28:16 +02:00
# To run all of the tests, which takes up to a minute:
$ LANGUAGE_TESTS=yes NIXPKGS_TESTS=yes cabal test
2018-04-03 09:33:30 +02:00
$ ./dist/build/hnix/hnix --help
```
## Building with benchmarks enabled
To build `hnix` with benchmarks enabled:
```
$ nix-shell --arg doBenchmarks true
$ cabal configure --enable-tests --enable-benchmarks
$ cabal build
$ cabal bench
```
2018-04-10 20:49:18 +02:00
## Building with profiling enabled
To build `hnix` with profiling enabled:
```
$ nix-shell --arg doProfiling true
$ cabal configure --enable-tests --enable-profiling
$ cabal build
2018-04-10 20:49:18 +02:00
$ ./dist/build/hnix/hnix <args> +RTS -p
```
## How you can help
2018-04-13 06:20:23 +02:00
If you're looking for a way to help out, try taking a look
[here](https://github.com/jwiegley/hnix/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+no%3Aassignee).
When you find an issue that looks interesting to you, comment on the ticket to
let others know you're working on it; look for others who might have done the
same. You can talk with everyone live on
[gitter](https://gitter.im/haskell-nix/Lobby).
When you're ready to submit a pull request, test it with:
```
2018-04-04 08:46:32 +02:00
git submodule update --init --recursive
nix-shell --run "LANGUAGE_TESTS=yes cabal test"
```
2018-04-13 06:20:23 +02:00
Make sure that all the tests that were passing prior to your PR are still
passing afterwards; it's OK if no new tests are passing.