Build with the http-client-restricted library when available

Otherwise use the vendored copy as before.

The library is in Debian testing but not stable. Once it reaches
stable, the vendored copy can be removed.

Did not add it to debian/control because IIRC that's used to build
git-annex on stable too, possibly. However, the Debian maintainer will
probably want to make the package depend on libghc-http-client-restricted-dev

This commit was sponsored by Ilya Shlyakhter on Patreon.
This commit is contained in:
Joey Hess 2020-06-22 11:30:33 -04:00
parent 01eb863a14
commit 104b3a9c6a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 28 additions and 3 deletions

View file

@ -9,6 +9,9 @@
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable, LambdaCase, PatternGuards #-}
-- This is a vendored copy of Network.HTTP.Client.Restricted from the
-- http-client-restricted package, and will be removed once that package
-- is available in all build environments.
module Utility.HttpManagerRestricted (
Restriction,
checkAddressRestriction,