on ce04788 help sign in
haskell.nix/modules/error-handler.nix
49 lines 2.6 kB history raw
1{ lib, config, ... }:
2{
3 options.errorHandler = lib.mkOption {
4 type = lib.types.unspecified;
5 };
7 config.errorHandler = {
8 buildDepError = pkg:
9 builtins.throw ''
10 The Haskell package set does not contain the package: ${pkg} (build dependency).
11 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.
12 '';
13 sysDepError = pkg:
14 builtins.throw ''
15 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
16 You may need to augment the system package mapping in haskell.nix so that it can be found.
17 '';
18 pkgConfDepError = pkg:
19 builtins.throw ''
20 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
21 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
22 '';
23 exeDepError = pkg:
24 builtins.throw ''
25 The local executable components do not include the component: ${pkg} (executable dependency).
26 '';
27 legacyExeDepError = pkg:
28 builtins.throw ''
29 The Haskell package set does not contain the package: ${pkg} (executable dependency).
30 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.
31 '';
32 setupDepError = pkg:
33 builtins.throw ''
34 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (setup dependency).
35 If this is a system dependency:
36 You may need to augment the system package mapping in haskell.nix so that it can be found.
37 If this is a Haskell dependency:
38 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.
39 '';
40 buildToolDepError = tool:
41 builtins.throw ''
42 Neither the Haskell package set or the Nixpkgs package set contain the tool: ${tool} (build tool dependency).
43 If this is a system dependency:
44 You may need to augment the system package mapping in haskell.nix so that it can be found.
45 If this is a Haskell dependency:
46 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.
47 '';
48 };