forked from mirrors/nixpkgs
29027fd1e1
Using pkgs.lib on the spine of module evaluation is problematic because the pkgs argument depends on the result of module evaluation. To prevent an infinite recursion, pkgs and some of the modules are evaluated twice, which is inefficient. Using ‘with lib’ prevents this problem.
33 lines
548 B
Nix
33 lines
548 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
fonts = {
|
|
|
|
enableCoreFonts = mkOption {
|
|
default = false;
|
|
description = ''
|
|
Whether to include Microsoft's proprietary Core Fonts. These fonts
|
|
are redistributable, but only verbatim, among other restrictions.
|
|
See <link xlink:href="http://corefonts.sourceforge.net/eula.htm"/>
|
|
for details.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
config = mkIf config.fonts.enableCoreFonts {
|
|
|
|
fonts.extraFonts = [ pkgs.corefonts ];
|
|
|
|
};
|
|
|
|
}
|