on bc4400d help sign in
haskell.nix/test/stack-simple/stack-simple.nix
83 lines 3.3 kB history raw
1let
2 buildDepError = pkg:
3 builtins.throw ''
4 The Haskell package set does not contain the package: ${pkg} (build dependency).
6 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.
7 '';
8 sysDepError = pkg:
9 builtins.throw ''
10 The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
12 You may need to augment the system package mapping in haskell.nix so that it can be found.
13 '';
14 pkgConfDepError = pkg:
15 builtins.throw ''
16 The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
18 You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19 '';
20 exeDepError = pkg:
21 builtins.throw ''
22 The local executable components do not include the component: ${pkg} (executable dependency).
23 '';
24 legacyExeDepError = pkg:
25 builtins.throw ''
26 The Haskell package set does not contain the package: ${pkg} (executable dependency).
28 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.
29 '';
30 buildToolDepError = pkg:
31 builtins.throw ''
32 Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
34 If this is a system dependency:
35 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 '';
40in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41 ({
42 flags = {};
43 package = {
44 specVersion = "0";
45 identifier = { name = "stack-simple"; version = "0.1.0.0"; };
46 license = "BSD-3-Clause";
47 copyright = "2019 Author name here";
48 maintainer = "example@example.com";
49 author = "Author name here";
50 homepage = "https://github.com/githubuser/stack-simple#readme";
51 url = "";
52 synopsis = "";
53 description = "Please see the README on GitHub at <https://github.com/githubuser/stack-simple#readme>";
54 buildType = "Simple";
55 isLocal = true;
56 };
57 components = {
58 "library" = {
59 depends = [ (hsPkgs."base" or (buildDepError "base")) ];
60 buildable = true;
61 };
62 exes = {
63 "stack-simple-exe" = {
64 depends = [
65 (hsPkgs."base" or (buildDepError "base"))
66 (hsPkgs."stack-simple" or (buildDepError "stack-simple"))
67 ];
68 buildable = true;
69 };
70 };
71 tests = {
72 "stack-simple-test" = {
73 depends = [
74 (hsPkgs."base" or (buildDepError "base"))
75 (hsPkgs."stack-simple" or (buildDepError "stack-simple"))
76 ];
77 buildable = true;
78 };
79 };
80 };
81 } // rec { src = (pkgs.lib).mkDefault ./.; }) // {
82 cabal-generator = "hpack";
83 }