forked from haskell/haskell-ide-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hie-plugin-api.nix
89 lines (83 loc) · 4.15 KB
/
hie-plugin-api.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
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 = { pedantic = false; };
package = {
specVersion = "2.0";
identifier = { name = "hie-plugin-api"; version = "0.14.0.0"; };
license = "BSD-3-Clause";
copyright = "2015 TBD";
maintainer = "alan.zimm@gmail.com (for now)";
author = "Many,TBD when we release";
homepage = "";
url = "";
synopsis = "Haskell IDE API for plugin communication";
description = "";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."Diff" or (buildDepError "Diff"))
(hsPkgs."aeson" or (buildDepError "aeson"))
(hsPkgs."constrained-dynamic" or (buildDepError "constrained-dynamic"))
(hsPkgs."containers" or (buildDepError "containers"))
(hsPkgs."data-default" or (buildDepError "data-default"))
(hsPkgs."directory" or (buildDepError "directory"))
(hsPkgs."filepath" or (buildDepError "filepath"))
(hsPkgs."fingertree" or (buildDepError "fingertree"))
(hsPkgs."free" or (buildDepError "free"))
(hsPkgs."ghc" or (buildDepError "ghc"))
(hsPkgs."ghc-mod-core" or (buildDepError "ghc-mod-core"))
(hsPkgs."ghc-project-types" or (buildDepError "ghc-project-types"))
(hsPkgs."haskell-lsp" or (buildDepError "haskell-lsp"))
(hsPkgs."hslogger" or (buildDepError "hslogger"))
(hsPkgs."monad-control" or (buildDepError "monad-control"))
(hsPkgs."mtl" or (buildDepError "mtl"))
(hsPkgs."rope-utf16-splay" or (buildDepError "rope-utf16-splay"))
(hsPkgs."stm" or (buildDepError "stm"))
(hsPkgs."syb" or (buildDepError "syb"))
(hsPkgs."text" or (buildDepError "text"))
(hsPkgs."transformers" or (buildDepError "transformers"))
(hsPkgs."unordered-containers" or (buildDepError "unordered-containers"))
] ++ (if system.isWindows
then [ (hsPkgs."Win32" or (buildDepError "Win32")) ]
else [ (hsPkgs."unix" or (buildDepError "unix")) ]);
buildable = true;
};
};
} // rec { src = (pkgs.lib).mkDefault ./hie-plugin-api; }