Unverified Commit 86ae7a62 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

Remove top level `with lib;` in docs (#293829)

parent ff352fc5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 {
+7 −1
Original line number Diff line number Diff line
@@ -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";
+1 −2
Original line number Diff line number Diff line
@@ -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

+2 −5
Original line number Diff line number Diff line
@@ -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;