summaryrefslogtreecommitdiff
path: root/rtnetlink.cabal
blob: 253b2df7dfc1bbc26b75acc4acaaf2b2e251df44 (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
name:               rtnetlink
version:            0.1.0.2
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://gitlab.com/formaltech/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 && <4.10,
        hspec     >=2.4 && <2.5,
        socket    >=0.8 && <0.9,
        unix      >=2.7 && <2.8,
        rtnetlink

executable rtnl-link
    if flag(examples)
        build-depends:
            base        >=4.7  && <4.10,
            bytestring  >=0.10 && <0.11,
            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  && <4.10,
            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-extensions:
        CPP,
        FlexibleContexts,
        FlexibleInstances,
        ForeignFunctionInterface,
        GeneralizedNewtypeDeriving,
        MultiParamTypeClasses,
        OverloadedStrings,
        RecordWildCards,
        TypeFamilies
    build-depends:
        base         >=4.7  && <4.10,
        bytestring   >=0.10 && <0.11,
        cereal       >=0.5  && <0.6,
        monad-loops  >=0.4  && <0.5,
        mtl          >=2.2  && <2.3,
        transformers >=0.4  && <0.6,
        random       >=1.1  && <1.2,
        socket       >=0.8  && <0.9,
        unix         >=2.7  && <2.8,
        pretty-hex   >=1.0  && <1.1
    default-language:   Haskell2010
    hs-source-dirs:     src
    build-tools:        hsc2hs
    default-language:   Haskell2010

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