-
Notifications
You must be signed in to change notification settings - Fork 244
/
Copy pathgenprimopcode.nix
40 lines (40 loc) · 1.55 KB
/
genprimopcode.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
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, errorHandler
, config
, ... }:
{
flags = { build-tool-depends = true; };
package = {
specVersion = "2.0";
identifier = { name = "genprimopcode"; version = "0.1"; };
license = "BSD-3-Clause";
copyright = "XXX";
maintainer = "XXX";
author = "XXX";
homepage = "";
url = "";
synopsis = "Generates various files implementing GHC's primitive operations.";
description = "This utility reads a textual description of GHC's primitive operations\n(@primops.txt.pp@) and produces a number of outputs. These include,\n\n* the @GHC.Prim@ module included in the @ghc-prim@ package.\n* the @GHC.PrimopWrappers@ module included in the @ghc-prim@ package.\n* an LaTeX document describing the primitive operations.";
buildType = "Simple";
};
components = {
exes = {
"genprimopcode" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."array" or (errorHandler.buildDepError "array"))
];
build-tools = pkgs.lib.optionals (flags.build-tool-depends) [
(hsPkgs.pkgsBuildBuild.alex.components.exes.alex or (pkgs.pkgsBuildBuild.alex or (errorHandler.buildToolDepError "alex:alex")))
(hsPkgs.pkgsBuildBuild.happy.components.exes.happy or (pkgs.pkgsBuildBuild.happy or (errorHandler.buildToolDepError "happy:happy")))
];
buildable = true;
};
};
};
} // rec { src = pkgs.lib.mkDefault ./.; }