Go to file
Gabriel Gonzalez aa359813c4
Install mostly static executables on OS X when using Nix (#830)
These aren't fully static executables (they still have some
`/nix/store` references), but they at least compile Haskell dependencies
statically.  That means that they can be `nix-env --install`ed side-by-side
with other Haskell executables, which would otherwise conflict with an
error like this one:

```
error: packages '/nix/store/hrxnlwlsiw5jjjkq5v6ihcwb0shx4fga-dhall-1.20.1/lib/li
nks/libHSbasement-0.0.8-8QjArDsw3GWCcbHE5iqtz3-ghc8.4.3.dylib' and '/nix/store/d
2y5373anwf1q3h86ar3lljk11k1lq0h-dhall-json-1.2.6/lib/links/libHSbasement-0.0.8-8
QjArDsw3GWCcbHE5iqtz3-ghc8.4.3.dylib' have the same priority 5; use 'nix-env --s
et-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the
conflicting packages (0 being the highest priority)
```
2019-03-04 19:43:31 -08:00
dhall Install mostly static executables on OS X when using Nix (#830) 2019-03-04 19:43:31 -08:00
dhall-bash Install mostly static executables on OS X when using Nix (#830) 2019-03-04 19:43:31 -08:00
dhall-json Install mostly static executables on OS X when using Nix (#830) 2019-03-04 19:43:31 -08:00
dhall-text Install mostly static executables on OS X when using Nix (#830) 2019-03-04 19:43:31 -08:00
dhall-try Version 1.19.1 → 1.20.0 (#767) 2018-12-29 11:48:21 -06:00
nix Install mostly static executables on OS X when using Nix (#830) 2019-03-04 19:43:31 -08:00
.gitignore Replace .gitigore with one from github/gitignore (#264) 2018-02-14 10:03:39 -08:00
.gitmodules Use git submodule to obtain official Prelude and test suite (#787) 2019-01-19 09:09:34 -08:00
.travis.yml Make format and dhall subcommands of dhall executable (#452) 2018-06-10 19:54:22 +02:00
LICENSE Migrate `dhall-{bash,json,text}` into this repository (#661) 2018-10-28 17:32:51 -07:00
README.md Explain how to use `cache.dhall-lang.org` (#827) 2019-02-24 12:43:43 -08:00
appveyor.yml Build dhall-json with lts-6 in appveyor (#818) 2019-02-15 15:09:35 -08:00
cabal.project Update stack/cabal config to sync with new structure (#671) 2018-11-06 05:42:23 -08:00
default.nix Change `default.nix` to use static linking when possible (#786) 2019-01-19 09:36:47 -08:00
release.nix Add `linux-dhall*` jobs to Hydra (#821) 2019-02-22 07:32:59 -08:00
stack-lts-6.yaml Build dhall-json with lts-6 in appveyor (#818) 2019-02-15 15:09:35 -08:00
stack-lts-11.yaml Update stack/cabal config to sync with new structure (#671) 2018-11-06 05:42:23 -08:00
stack-lts-12.yaml Add eta support and update stack config to lts-13 (#778) 2019-01-11 19:35:39 -08:00
stack.yaml Build dhall-json with lts-6 in appveyor (#818) 2019-02-15 15:09:35 -08:00

README.md

dhall-haskell

You will probably want to read the language-agnostic README here:

This repository focuses on the Haskell bindings to Dhall and contains the following packages:

Navigate to each package's directory for their respective READMEs

Pre-built binaries

You can download pre-built binaries for Windows and Linux on the release page:

For OS X, use brew to install the desired package. For example:

$ brew install dhall-json

You can also install pre-built Linux binaries for master using Nix using Nix's channel mechanism by following the instructions at this link:

To install the Nix build products without a channel, configure your machine to use cache.dhall-lang.org, as described in the nix section and then visit one of the following links:

You can then click the "Help" button in the bottom right corner, which will show you a nix-env command that you can run to install the prebuilt executable.

If you have the jq command-line tool installed then you can do this in one command by running:

$ nix-env -i "$(curl -L https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall/latest/api/get-info | jq -r .outPath)"

These instructions also work for any pull request, too, by replacing master with the pull request number for any of the above URLs.

Building from source

For all of the following instructions, make sure to first check out the dhall-lang submodule:

$ git submodule init
$ git submodule update

cabal

You can build all of the packages by running:

$ cabal new-build all

And each of them with cabal new-build <package-name>, for example:

$ cabal new-build dhall

... or you can run cabal new-build within each package directory.

nix

You will probably want to use the shared cache hosted at cache.dhall-lang.org when doing Nix development. This is not required, but this will save you a lot of time so that you don't have to build as many dependencies from scratch the first time.

If your operating system is NixOS then you can add the cache using these NixOS configuration options:

  nix = {
    binaryCaches = [ "https://cache.nixos.org" "https://cache.dhall-lang.org" ];

    binaryCachePublicKeys = [
      "cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM="
    ];
  };

If you don't use NixOS but you do use Nix 2.0 or later, then set these options in your /etc/nix/nix.conf file:

trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM=
substituters = https://cache.nixos.org https://cache.dhall-lang.org

If you use an older version of Nix (i.e. Nix 1.*) then use these options instead:

binary-cache-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM=
binary-caches = https://cache.nixos.org https://cache.dhall-lang.org

You can build all of the packages by running:

$ nix-build

... or you can run nix-build within each package's respective directory to build just that one package.

You can install all of the packages by running:

$ nix-env --install --file default.nix

... or you can run the same command within each package's respective directory to install just that one package.

You can develop any package by navigating to that package's directory and running:

$ nix-shell
[nix-shell]$ cabal configure
[nix-shell]$ cabal build
[nix-shell]$ cabal test

... or you can add nix: True to your ~/.cabal/config file and then you can run the same cabal commands without an explicit nix-shell:

$ cabal configure
$ cabal build
$ cabal test

stack

You can build all of the packages with

$ stack build

And each of them with stack build <package-name>, for example:

$ stack build dhall-json

Build the website

Building the website from source is currently only supported for Nix on Linux.

You can build the static assets by running:

$ nix-build --attr website

... then open ./result/index.html in your browser.

You can also download an archive containing the pre-built website from CI using this link:

Contributing

Read the following guide if you would like to contribute: