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: ad97ca4e510a
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: d2a41be2f384
Choose a head ref
  • 6 commits
  • 15 files changed
  • 4 contributors

Commits on Jan 24, 2021

  1. Revert "Remove types.functionTo."

    This reverts commit 4ff1ab5.
    
    We need this to type options like:
    services.xserver.windowManager.xmonad.extraPackages that specify functions that
    take an attribute set containing packages / plugins and return a list containing
    a selection of the values in this set.
    
    The reason we need a dedicated type for this is to have the correct merge
    behaviour. Without the functionTo type merging multiple function option
    definitions results in an evaluation error. The functionTo type merges
    definitions by returning a new function that applies the functions of all the
    definitions to the given input and merges the result.
    
    (cherry picked from commit 7ed41ff)
    basvandijk authored and infinisil committed Jan 24, 2021
    Copy the full SHA
    b454af2 View commit details
    Browse the repository at this point in the history
  2. lib/tests/modules: add a test for the functionTo type

    (cherry picked from commit 478af11)
    basvandijk authored and infinisil committed Jan 24, 2021
    Copy the full SHA
    4324353 View commit details
    Browse the repository at this point in the history
  3. nixos: use functionTo to prevent evaluation errors while merging

    Without this patch merging options like
    services.xserver.windowManager.xmonad.extraPackages
    results in the evaluation error:
    
      error: value is a list while a set was expected, at nixpkgs/lib/options.nix:77:23
    
    With this patch we get the desired merging behaviour that just concatenates the
    resulting package lists.
    
    (cherry picked from commit 6e99f9f)
    
    Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
    basvandijk and infinisil committed Jan 24, 2021
    Copy the full SHA
    8ac4b25 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2021

  1. lib/types: Improved functionTo merging

    Now type checks the resulting function values and allows mkMerge and co.
    Also indicates that the type check is done in the function body
    
    Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
    infinisil and roberth committed Jan 26, 2021
    Copy the full SHA
    e9101d4 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    c2f3556 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2021

  1. Merge pull request #110707 from Infinisil/functionTo

    Bring back `types.functionTo`
    roberth committed Jan 27, 2021
    Copy the full SHA
    d2a41be View commit details
    Browse the repository at this point in the history