Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, config, ... }: 2{ 3 options = { 4 name = lib.mkOption { 5 type = lib.types.str; 6 default = lib.getName config.package + "-with-config"; 7 defaultText = lib.literalExpression "\"\${getName package}-with-config\""; 8 description = '' 9 Name to use for the wrapped treefmt package. 10 ''; 11 }; 12 13 runtimeInputs = lib.mkOption { 14 type = with lib.types; listOf package; 15 default = [ ]; 16 description = '' 17 Packages to include on treefmt's PATH. 18 ''; 19 }; 20 21 configFile = lib.mkOption { 22 type = lib.types.path; 23 # Ensure file is copied to the store 24 apply = file: if lib.isDerivation file then file else "${file}"; 25 defaultText = lib.literalMD "generated from [](#opt-treefmt-settings)"; 26 description = '' 27 The treefmt config file. 28 ''; 29 }; 30 31 package = lib.mkOption { 32 type = lib.types.package; 33 defaultText = lib.literalExpression "pkgs.treefmt"; 34 description = '' 35 The treefmt package to wrap. 36 ''; 37 internal = true; 38 }; 39 }; 40}