diff options
-rw-r--r-- | doc/functions/generators.section.md | 3 | ||||
-rw-r--r-- | doc/languages-frameworks/coq.section.md | 8 | ||||
-rw-r--r-- | nixos/doc/manual/development/replace-modules.section.md | 3 | ||||
-rw-r--r-- | nixos/doc/manual/development/writing-modules.chapter.md | 7 |
4 files changed, 12 insertions, 9 deletions
diff --git a/doc/functions/generators.section.md b/doc/functions/generators.section.md index 8b3ae6843a227..dbfc302a3abf7 100644 --- a/doc/functions/generators.section.md +++ b/doc/functions/generators.section.md @@ -6,8 +6,9 @@ All generators follow a similar call interface: `generatorName configFunctions d Generators can be fine-tuned to produce exactly the file format required by your application/service. One example is an INI-file format which uses `: ` as separator, the strings `"yes"`/`"no"` as boolean values and requires all string values to be quoted: ```nix -with lib; let + inherit (lib) generators isString; + customToINI = generators.toINI { # specifies how to format a key/value pair mkKeyValue = generators.mkKeyValueDefault { diff --git a/doc/languages-frameworks/coq.section.md b/doc/languages-frameworks/coq.section.md index 6ca1997083776..db3724773345e 100644 --- a/doc/languages-frameworks/coq.section.md +++ b/doc/languages-frameworks/coq.section.md @@ -55,7 +55,13 @@ Here is a simple package example. It is a pure Coq library, thus it depends on C ```nix { lib, mkCoqDerivation, version ? null , coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }: -with lib; mkCoqDerivation { + +let + inherit (lib) licenses maintainers switch; + inherit (lib.versions) range; +in + +mkCoqDerivation { /* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */ namePrefix = [ "coq" "mathcomp" ]; pname = "multinomials"; diff --git a/nixos/doc/manual/development/replace-modules.section.md b/nixos/doc/manual/development/replace-modules.section.md index ac9f5adbaf981..45e2adbc26088 100644 --- a/nixos/doc/manual/development/replace-modules.section.md +++ b/nixos/doc/manual/development/replace-modules.section.md @@ -47,9 +47,8 @@ without having to know its implementation details. ```nix { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) mkIf mkOption types; cfg = config.programs.man; in diff --git a/nixos/doc/manual/development/writing-modules.chapter.md b/nixos/doc/manual/development/writing-modules.chapter.md index e07b899e6df7b..20157a21e890f 100644 --- a/nixos/doc/manual/development/writing-modules.chapter.md +++ b/nixos/doc/manual/development/writing-modules.chapter.md @@ -104,9 +104,8 @@ functions system environment substitution should *not* be disabled explicitly. ```nix { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) concatStringsSep mkIf mkOption optionalString types; cfg = config.services.locate; in { options.services.locate = { @@ -163,9 +162,7 @@ in { ::: {#exec-escaping-example .example} ### Escaping in Exec directives ```nix -{ config, lib, pkgs, utils, ... }: - -with lib; +{ config, pkgs, utils, ... }: let cfg = config.services.echo; |