OCaml: Difference between revisions
imported>Samuela No edit summary |
overrideScope |
||
| Line 67: | Line 67: | ||
=== Custom version === | === Custom version === | ||
So as to get the set of OCaml libraries built with/for a custom version of the OCaml compiler, e.g., to enable '''flambda''' support, you may use the '''ocamlPackages.overrideScope | So as to get the set of OCaml libraries built with/for a custom version of the OCaml compiler, e.g., to enable '''flambda''' support, you may use the '''ocamlPackages.overrideScope''' function: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
ocamlPackagesFlambda = ocamlPackages.overrideScope | ocamlPackagesFlambda = ocamlPackages.overrideScope (self: super: { | ||
ocaml = super.ocaml.override { flambdaSupport = true; }; | ocaml = super.ocaml.override { flambdaSupport = true; }; | ||
}); | }); | ||