e811e7b8dc
GitOrigin-RevId: 689b76bcf36055afdeb2e9852f5ecdd2bf483f87
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
# This file defines the structure of the `config` nixpkgs option.
|
|
|
|
{ lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
mkMassRebuild = args: mkOption (builtins.removeAttrs args [ "feature" ] // {
|
|
type = args.type or (types.uniq types.bool);
|
|
default = args.default or false;
|
|
description = (args.description or ''
|
|
Whether to ${args.feature} while building nixpkgs packages.
|
|
'') + ''
|
|
Changing the default may cause a mass rebuild.
|
|
'';
|
|
});
|
|
|
|
options = {
|
|
|
|
/* Internal stuff */
|
|
|
|
warnings = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [];
|
|
internal = true;
|
|
};
|
|
|
|
/* Config options */
|
|
|
|
doCheckByDefault = mkMassRebuild {
|
|
feature = "run <literal>checkPhase</literal> by default";
|
|
};
|
|
|
|
path = mkOption {
|
|
type = types.path;
|
|
default = ../..;
|
|
defaultText = lib.literalDocBook "a path expression";
|
|
internal = true;
|
|
description = ''
|
|
A reference to Nixpkgs' own sources.
|
|
|
|
This is overridable in order to avoid copying sources unnecessarily,
|
|
as a path expression that references a store path will not short-circuit
|
|
to the store path itself, but copy the store path instead.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
inherit options;
|
|
|
|
}
|