-
Notifications
You must be signed in to change notification settings - Fork 0
/
websockets.nix
159 lines (153 loc) · 8.49 KB
/
websockets.nix
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
let
buildDepError = pkg:
builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
sysDepError = pkg:
builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found.
'';
pkgConfDepError = pkg:
builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
'';
exeDepError = pkg:
builtins.throw ''
The local executable components do not include the component: ${pkg} (executable dependency).
'';
legacyExeDepError = pkg:
builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
buildToolDepError = pkg:
builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency:
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
{
flags = { example = false; };
package = {
specVersion = "1.8";
identifier = { name = "websockets"; version = "0.12.5.3"; };
license = "BSD-3-Clause";
copyright = "(c) 2010-2011 Siniša Biđin\n(c) 2011-2018 Jasper Van der Jeugt\n(c) 2011 Steffen Schuldenzucker\n(c) 2011 Alex Lang";
maintainer = "Jasper Van der Jeugt <[email protected]>";
author = "Siniša Biđin <[email protected]>\nJasper Van der Jeugt <[email protected]>\nSteffen Schuldenzucker <[email protected]>\nAlex Lang <[email protected]>";
homepage = "http://jaspervdj.be/websockets";
url = "";
synopsis = "A sensible and clean way to write WebSocket-capable servers in Haskell.";
description = "This library allows you to write WebSocket-capable servers.\n\nAn example server:\n<https://github.com/jaspervdj/websockets/blob/master/example/server.lhs>\n\nAn example client:\n<https://github.com/jaspervdj/websockets/blob/master/example/client.hs>\n\nSee also:\n\n* The specification of the WebSocket protocol:\n<http://www.whatwg.org/specs/web-socket-protocol/>\n\n* The JavaScript API for dealing with WebSockets:\n<http://www.w3.org/TR/websockets/>";
buildType = "Simple";
};
components = {
"library" = {
depends = [
(hsPkgs."attoparsec" or (buildDepError "attoparsec"))
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."base64-bytestring" or (buildDepError "base64-bytestring"))
(hsPkgs."binary" or (buildDepError "binary"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."bytestring-builder" or (buildDepError "bytestring-builder"))
(hsPkgs."case-insensitive" or (buildDepError "case-insensitive"))
(hsPkgs."containers" or (buildDepError "containers"))
(hsPkgs."network" or (buildDepError "network"))
(hsPkgs."random" or (buildDepError "random"))
(hsPkgs."SHA" or (buildDepError "SHA"))
(hsPkgs."streaming-commons" or (buildDepError "streaming-commons"))
(hsPkgs."text" or (buildDepError "text"))
(hsPkgs."entropy" or (buildDepError "entropy"))
];
};
exes = {
"websockets-example" = {
depends = [
(hsPkgs."websockets" or (buildDepError "websockets"))
(hsPkgs."attoparsec" or (buildDepError "attoparsec"))
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."base64-bytestring" or (buildDepError "base64-bytestring"))
(hsPkgs."binary" or (buildDepError "binary"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."bytestring-builder" or (buildDepError "bytestring-builder"))
(hsPkgs."case-insensitive" or (buildDepError "case-insensitive"))
(hsPkgs."containers" or (buildDepError "containers"))
(hsPkgs."network" or (buildDepError "network"))
(hsPkgs."random" or (buildDepError "random"))
(hsPkgs."SHA" or (buildDepError "SHA"))
(hsPkgs."text" or (buildDepError "text"))
(hsPkgs."entropy" or (buildDepError "entropy"))
];
};
"websockets-autobahn" = {
depends = [
(hsPkgs."websockets" or (buildDepError "websockets"))
(hsPkgs."attoparsec" or (buildDepError "attoparsec"))
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."base64-bytestring" or (buildDepError "base64-bytestring"))
(hsPkgs."binary" or (buildDepError "binary"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."bytestring-builder" or (buildDepError "bytestring-builder"))
(hsPkgs."case-insensitive" or (buildDepError "case-insensitive"))
(hsPkgs."containers" or (buildDepError "containers"))
(hsPkgs."network" or (buildDepError "network"))
(hsPkgs."random" or (buildDepError "random"))
(hsPkgs."SHA" or (buildDepError "SHA"))
(hsPkgs."text" or (buildDepError "text"))
(hsPkgs."entropy" or (buildDepError "entropy"))
];
};
};
tests = {
"websockets-tests" = {
depends = [
(hsPkgs."HUnit" or (buildDepError "HUnit"))
(hsPkgs."QuickCheck" or (buildDepError "QuickCheck"))
(hsPkgs."test-framework" or (buildDepError "test-framework"))
(hsPkgs."test-framework-hunit" or (buildDepError "test-framework-hunit"))
(hsPkgs."test-framework-quickcheck2" or (buildDepError "test-framework-quickcheck2"))
(hsPkgs."attoparsec" or (buildDepError "attoparsec"))
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."base64-bytestring" or (buildDepError "base64-bytestring"))
(hsPkgs."binary" or (buildDepError "binary"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."bytestring-builder" or (buildDepError "bytestring-builder"))
(hsPkgs."case-insensitive" or (buildDepError "case-insensitive"))
(hsPkgs."containers" or (buildDepError "containers"))
(hsPkgs."network" or (buildDepError "network"))
(hsPkgs."random" or (buildDepError "random"))
(hsPkgs."SHA" or (buildDepError "SHA"))
(hsPkgs."streaming-commons" or (buildDepError "streaming-commons"))
(hsPkgs."text" or (buildDepError "text"))
(hsPkgs."entropy" or (buildDepError "entropy"))
];
};
};
benchmarks = {
"bench-mask" = {
depends = [
(hsPkgs."criterion" or (buildDepError "criterion"))
(hsPkgs."attoparsec" or (buildDepError "attoparsec"))
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."base64-bytestring" or (buildDepError "base64-bytestring"))
(hsPkgs."binary" or (buildDepError "binary"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."bytestring-builder" or (buildDepError "bytestring-builder"))
(hsPkgs."case-insensitive" or (buildDepError "case-insensitive"))
(hsPkgs."containers" or (buildDepError "containers"))
(hsPkgs."network" or (buildDepError "network"))
(hsPkgs."random" or (buildDepError "random"))
(hsPkgs."SHA" or (buildDepError "SHA"))
(hsPkgs."text" or (buildDepError "text"))
(hsPkgs."entropy" or (buildDepError "entropy"))
];
};
};
};
} // rec { src = (pkgs.lib).mkDefault /home/sino/mygithub/websockets; }