summaryrefslogtreecommitdiff
path: root/erebos.cabal
diff options
context:
space:
mode:
Diffstat (limited to 'erebos.cabal')
-rw-r--r--erebos.cabal27
1 files changed, 21 insertions, 6 deletions
diff --git a/erebos.cabal b/erebos.cabal
index 33137ce..ae39aa0 100644
--- a/erebos.cabal
+++ b/erebos.cabal
@@ -35,6 +35,10 @@ Extra-Source-Files:
flag ice
Description: Enable peer discovery with ICE support using pjproject
+flag sockets
+ description: Enable IP networking using sockets
+ default: True
+
flag crypton
description: Use 'crypton' package as crypto backend
default: True
@@ -76,6 +80,8 @@ common common
default-extensions:
DefaultSignatures
DataKinds
+ EmptyCase
+ EmptyDataDeriving
ExistentialQuantification
FlexibleContexts
FlexibleInstances
@@ -160,12 +166,14 @@ library
Erebos.Util
Service
- c-sources:
- src/Erebos/Network/ifaddrs.c
include-dirs:
src
- includes:
- src/Erebos/Network/ifaddrs.h
+
+ if flag(sockets)
+ c-sources:
+ src/Erebos/Network/ifaddrs.c
+ includes:
+ src/Erebos/Network/ifaddrs.h
if flag(ice)
other-modules:
@@ -191,15 +199,19 @@ library
fsnotify ^>= { 0.3, 0.4 },
hashable ^>= { 1.3, 1.4, 1.5 },
hashtables ^>= { 1.2, 1.3, 1.4 },
- iproute >=1.7.12 && <1.8,
mtl ^>= { 2.2.2, 2.3 },
- network ^>= { 3.1, 3.2 },
stm >=2.5 && <2.6,
text >= 1.2 && <2.2,
time ^>= { 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16 },
uuid-types ^>= { 1.0.4 },
zlib >=0.6 && <0.8
+ if flag(sockets)
+ build-depends:
+ iproute ^>= { 1.7.12 },
+ network ^>= { 3.1, 3.2 },
+ cpp-options: -DENABLE_SOCKETS
+
if flag(crypton)
if flag(cryptonite) || flag(crypto-reflibs)
build-depends:
@@ -286,6 +298,9 @@ executable erebos
hs-source-dirs: main
ghc-options: -threaded
+ if !flag(sockets)
+ buildable: False
+
main-is: Main.hs
other-modules:
Paths_erebos