Files
haskell.nix/docs/dev/hix.md
T
Hamish Mackenzie 6b28399864 Add Hix wrappers for Nix tools (#1053)
The `hix` tools are wrappers for the various `nix` tools that
use `haskell.nix` without the need to add any `.nix` files.

This is useful for:

* A quick way to try out haskell.nix for new users.

* Using haskell.nix to work on projects that do not have
  `.nix` files.

* Testing to see if `haskell.nix` can build a project.

* Making `flake` and `non flake` configurations to check `haskell.nix`
  treats them the same.

The configuration arguments for `Hix` can be (from highest precedence to lowest):

* Passed on the command line with `--arg` (or `--argstr` for string args).

* Placed in `nix/hix.nix` file in the project dir.

* Placed in `~/.config/hix/hix.conf`

Boilerplate `default.nix`, `shell.nix` and `flake.nix` files can be added to a
a project with a `nix/hix.nix` file to make it work with the standard `Nix`
tools.
2021-06-26 17:58:06 +12:00

652 B

Making changes to Hix

When making changes to the way Hix works it is often useful to be able to test the changes locally before uploading them to github.

Hix Command Wrappers

Install the hix command wrappers after making changes to a local clone of haskell.nix:

nix-env -iA hix -f /path/to/local/haskell.nix
hix-shell

Or override the version of haskell.nix used by the commands with the HIX_ROOT environment variable:

HIX_ROOT=/path/to/local/haskell.nix hix-shell

Flakes

For flakes use --override-input to point to the modified haskell.nix:

nix develop --override-input haskellNix /path/to/local/haskell.nix