aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/error_compiling_network-info_when_compiling_git-annex/comment_1_1b5d236567123300924427624e0e48c8._comment
blob: 8ee7885a6fe3fe1306901c4c34975cd6e3dfb73d (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
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="108.236.230.124"
 subject="comment 1"
 date="2014-06-06T16:53:21Z"
 content="""
http://packdeps.haskellers.com/reverse/network-info

It's uuid which needs network-info -- but not for the parts of uuid which git-annex uses. (git-annex does not use the uuids that include the MAC address).

It's not hard to avoid that dependency. The attached patch will do. I've forwarded this to the author of uuid.

<pre>
diff --git a/uuid.cabal b/uuid.cabal
index 0a53059..f00e887 100644
--- a/uuid.cabal
+++ b/uuid.cabal
@@ -24,6 +24,9 @@ Extra-Source-Files:
      CHANGES
      CONTRIBUTORS
 
+Flag NetworkInfo
+  Description: Enable UUIDs that need network-info
+  Default: True
 
 Library
  Build-Depends: base >=3 && < 5,
@@ -32,17 +35,20 @@ Library
                 cryptohash >= 0.7 && < 0.12,
                 deepseq == 1.3.*,
                 hashable (>= 1.1.1.0 && < 1.2.0) || (>= 1.2.1 && < 1.3),
-                network-info == 0.2.*,
                 random >= 1.0.1 && < 1.1,
                 time >= 1.1 && < 1.5
+ if flag(NetworkInfo)
+   Build-Depends: network-info == 0.2.*
 
  Exposed-Modules:
    Data.UUID
-   Data.UUID.Util
-   Data.UUID.V1
    Data.UUID.V3
    Data.UUID.V4
    Data.UUID.V5
+ if flag(NetworkInfo)
+   Exposed-Modules:
+     Data.UUID.Util
+     Data.UUID.V1
 
  Other-Modules:
    Data.UUID.Builder
</pre>
"""]]