Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: aa600362ad9e
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: eb0148e90b3e
Choose a head ref
  • 2 commits
  • 13 files changed
  • 1 contributor

Commits on Apr 2, 2020

  1. nixos/treewide: Fix incorrectly rendered examples

    Many options define their example to be a Nix value without using
    literalExample. This sometimes gets rendered incorrectly in the manual,
    causing confusion like in #25516
    
    This fixes it by using literalExample for such options. The list of
    option to fix was determined with this expression:
    
      let
        nixos = import ./nixos { configuration = {}; };
        lib = import ./lib;
        valid = d: {
          # escapeNixIdentifier from #82461
          set = lib.all (n: lib.strings.escapeNixIdentifier n == n) (lib.attrNames d) && lib.all (v: valid v) (lib.attrValues d);
          list = lib.all (v: valid v) d;
        }.${builtins.typeOf d} or true;
    
        optionList = lib.optionAttrSetToDocList nixos.options;
    
      in map (opt: {
        file = lib.elemAt opt.declarations 0;
        loc = lib.options.showOption opt.loc;
      }) (lib.filter (opt: if opt ? example then ! valid opt.example else false) optionList)
    
    which when evaluated will output all options that use a Nix identifier
    that would need escaping as an attribute name.
    infinisil committed Apr 2, 2020
    Copy the full SHA
    1d0fc97 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2020

  1. Merge pull request #84074 from Infinisil/fix-literal-option-examples

    nixos/treewide: Fix incorrectly rendered examples
    infinisil committed Apr 3, 2020
    Copy the full SHA
    eb0148e View commit details
    Browse the repository at this point in the history