README.md 1.04 KB
Newer Older
1
# horizon-gen-nix
2

Max Tomago's avatar
Max Tomago committed
3

4 5 6 7 8
horizon-gen-nix is an executable for generating nix expressions
from [horizon-spec](https://hackage.haskell.org/package/horizon-spec)
dhall definitions.

```
Max Tomago's avatar
Max Tomago committed
9
Usage: horizon-gen-nix [--input-file INPUT_FILE]
10 11 12 13

Available options:
  -h,--help                Show this help text
  --input-file INPUT_FILE  The name of the input file.
Max Tomago's avatar
Max Tomago committed
14 15 16
```

## Example input
17

Max Tomago's avatar
Max Tomago committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
The input file mentioned in the previous sections contains a dhall expression of
the `HorizonExport` type (see `horizon-spec`).

Here is an example input file:

```
let H =
      https://gitlab.homotopic.tech/horizon/horizon-spec/-/raw/0.4.1/dhall/package.dhall
        sha256:9f2def711ea8796cdb24fa837da6681f9a7e752f87aeff08eee9b494c6e3374c

in  H.HorizonExport.MakeOverlay
      { packagesDir = "pkgs"
      , overlayFile = "overlay.nix"
      , overlay =
        [ H.callHackage "cabal2nix" "2.19.1"
        , H.callHackage "distribution-nixpkgs" "1.7.0.1"
        , H.callHackage "horizon-spec" "0.4.1"
        ]
      }
37 38
```

39 40 41 42 43 44 45 46 47 48 49
## Building

```
nix build
```

## Development

```
nix develop
```