summaryrefslogtreecommitdiff
path: root/rtnetlink.cabal
blob: 21e4ccd43ee0f35620c417a93c1d9ff3403e1e65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name:               rtnetlink
version:            0.2.0.0
synopsis:           Manipulate network devices, addresses, and routes on Linux
description:        A high-level, extensible, pure-Haskell interface to the
                    ROUTE_NETLINK subsystem of netlink for manipulating
                    network devices on Linux.

                    RTNetlink provides the RTNL monad to simplify sending
                    and receiving messages, pre-built types for manipulating
                    devices and addresses, and typeclasses for creating your
                    own messages, based on linux\/netlink.h,
                    linux\/rtnetlink.h, et al.
license:            BSD3
license-file:       LICENSE
author:             Ben Hamlin
maintainer:         Ben Hamlin <protob3n@gmail.com>
copyright:          Formaltech Inc.
category:           Network, System
build-type:         Simple
extra-source-files: ChangeLog.md
cabal-version:      >=1.10
homepage:           https://github.com/protoben/rtnetlink.hs

flag examples
    description:    Build example programs
    default:        False

test-suite rtnetlink-tests
    default-language:   Haskell2010
    type:               exitcode-stdio-1.0
    hs-source-dirs:     tests
    main-is:            Main.hs
    build-depends:
        base             >=4.7  && <5,
        bytestring       >=0.10 && <0.11,
        exceptions       >=0.8  && <0.11,
        hspec            >=2.4  && <3,
        socket           >=0.8  && <0.9,
        unix             >=2.7  && <2.8,
        linux-namespaces >=0.1 && <0.2,
        rtnetlink

executable rtnl-link
    if flag(examples)
        build-depends:
            base        >=4.7  && <5,
            bytestring  >=0.10 && <0.11,
            split       >=0.2  && <0.3,
            rtnetlink
    else
        buildable:      False
    main-is:            examples/rtnl-link/Main.hs
    default-language:   Haskell2010

executable rtnl-address
    if flag(examples)
        build-depends:
            base        >=4.7  && <5,
            socket      >=0.8  && <0.9,
            split       >=0.2  && <0.3,
            rtnetlink
    else
        buildable:      False
    main-is:            examples/rtnl-address/Main.hs
    default-language:   Haskell2010

library
    exposed-modules:
        System.Linux.RTNetlink,
        System.Linux.RTNetlink.Address,
        System.Linux.RTNetlink.Link,
        System.Linux.RTNetlink.Message,
        System.Linux.RTNetlink.Packet,
        System.Socket.Family.Netlink,
        System.Socket.Protocol.RTNetlink
    other-modules:
        System.Linux.RTNetlink.Util
    other-extensions:
        CPP,
        FlexibleContexts,
        FlexibleInstances,
        ForeignFunctionInterface,
        GeneralizedNewtypeDeriving,
        MultiParamTypeClasses,
        OverloadedStrings,
        RecordWildCards,
        TypeFamilies
    build-depends:
        base            >=4.7  && <5,
        bits-bytestring >=0.1  && <0.2,
        bytestring      >=0.10 && <0.11,
        cereal          >=0.5  && <0.6,
        exceptions      >=0.8  && <0.11,
        pretty-hex      >=1.0  && <1.1,
        random          >=1.1  && <1.2,
        socket          >=0.8  && <0.9,
        transformers    >=0.4  && <0.6,
        unix            >=2.7  && <2.8
    default-language:   Haskell2010
    hs-source-dirs:     src
    build-tools:        hsc2hs

source-repository head
    type:           git
    location:       https://gitlab.com/formaltech/rtnetlink-hs