fd8683216d
* Allow customization of remote import resolution Makes the `Status` type more general; previously support for `Network.HTTP.Client` was hardcoded. In short: ``` data Status = Status { _stack :: NonEmpty Chained [...] -- , _manager :: Maybe Dynamic -- -- importing the same expression twice with different values ++ , _remote :: URL -> StateT Status IO Data.Text.Text ++ -- ^ The remote resolver, fetches the content at the given URL. [...] } ``` * Simplify and expose `toHeaders` `toHeaders` will be needed for mock http testing * Fix compilation without `with-http` flag * Fix compilation with `with-http` flag * Fix tests without `with-http` flag Implements a mock http client that handles requests to: - `https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/` - `https://test.dhall-lang.org/Bool/package.dhall` - `https://httpbin.org/user-agent` This allows tests involving remote imports to succeed even when compiled without the `with-http` flag. * Build `dhall` with HTTP support compiled out in CI ... to prevent regressions from occurring in the future
96 lines
2.8 KiB
Nix
96 lines
2.8 KiB
Nix
{ src ? { rev = ""; }, ... }:
|
|
|
|
let
|
|
shared_7_10_3 =
|
|
import ./nix/shared.nix { compiler = "ghc7103"; };
|
|
|
|
shared_8_6_1 =
|
|
import ./nix/shared.nix { compiler = "ghc861"; };
|
|
|
|
shared_ghcjs =
|
|
import ./nix/shared.nix { compiler = "ghcjs"; };
|
|
|
|
shared =
|
|
import ./nix/shared.nix { };
|
|
|
|
shared_linux =
|
|
import ./nix/shared.nix { system = "x86_64-linux"; };
|
|
|
|
coverage =
|
|
import ./nix/shared.nix { coverage = true; };
|
|
|
|
in
|
|
{ dhall = shared.aggregate
|
|
{ name = "dhall";
|
|
|
|
constituents = [
|
|
# Verify that the packages build against the oldest supported version
|
|
# of the compiler
|
|
shared_7_10_3.dhall
|
|
shared_7_10_3.dhall-bash
|
|
shared_7_10_3.dhall-json
|
|
# `base-noprelude` depends on a specific version of `base`
|
|
# shared_7_10_3.dhall-lsp-server
|
|
# `hnix` depends on `lens-family-th`, which doesn't support GHC 7.10.3
|
|
# shared_7_10_3.dhall-nix
|
|
|
|
# Verify that the packages build against the latest supported version
|
|
# of the compiler
|
|
shared_8_6_1.dhall
|
|
shared_8_6_1.dhall-bash
|
|
shared_8_6_1.dhall-json
|
|
# `base-noprelude` depends on a specific version of `base`
|
|
# shared_8_6_1.dhall-lsp-server
|
|
# `hnix` depends on `unix-2.7.*` and doesn't work with GHC 8.6
|
|
# shared_8_6_1.dhall-nix
|
|
|
|
# However, we still use GHC 8.4.3 to build the distributed tarballs
|
|
# due to a bug in GHC 8.6.1. See:
|
|
#
|
|
# https://ghc.haskell.org/trac/ghc/ticket/15696
|
|
shared.tarball-dhall
|
|
shared.tarball-dhall-bash
|
|
shared.tarball-dhall-json
|
|
shared.tarball-dhall-lsp-server
|
|
shared.tarball-dhall-nix
|
|
|
|
shared_ghcjs.tarball-website
|
|
|
|
# This is the only `dhall` build that runs the test suite
|
|
coverage.dhall
|
|
coverage.dhall-json
|
|
|
|
# Check that the package builds with HTTP support compiled out
|
|
shared.dhall-no-http
|
|
|
|
(shared.trivial src.rev)
|
|
];
|
|
};
|
|
|
|
"coverage-dhall" = coverage.dhall;
|
|
|
|
inherit (shared_ghcjs) tarball-website;
|
|
|
|
inherit (shared)
|
|
tarball-dhall
|
|
tarball-dhall-bash
|
|
tarball-dhall-json
|
|
tarball-dhall-lsp-server
|
|
tarball-dhall-nix
|
|
;
|
|
|
|
linux-dhall = shared_linux.possibly-static.dhall;
|
|
linux-dhall-bash = shared_linux.possibly-static.dhall-bash;
|
|
linux-dhall-json = shared_linux.possibly-static.dhall-json;
|
|
linux-dhall-lsp-server = shared_linux.possibly-static.dhall-lsp-server;
|
|
linux-dhall-nix = shared_linux.possibly-static.dhall-nix;
|
|
|
|
inherit (shared_linux)
|
|
image-dhall
|
|
image-dhall-bash
|
|
image-dhall-json
|
|
image-dhall-lsp-server
|
|
image-dhall-nix
|
|
;
|
|
}
|