Skip to content

Commit

Permalink
haskell: comment about configuration-nix.nix's intersectAttrs
Browse files Browse the repository at this point in the history
  • Loading branch information
bennofs committed Mar 12, 2017
1 parent 2df3b5c commit 039c6a6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkgs/development/haskell-modules/configuration-nix.nix
Expand Up @@ -29,6 +29,17 @@

with import ./lib.nix { inherit pkgs; };

# All of the overrides in this set should look like:
#
# foo = ... something involving super.foo ...
#
# but that means that we add `foo` attribute even is there is no `super.foo`! So if
# you want to use this configuration for a package set that only contains a subset of
# the packages that have overrides defined here, you'll end up with a set that contains
# a bunch of attributes that trigger an evaluation error.
#
# To avoid this, we use `intersectAttrs` here so we never add packages that are not present
# in the parent package set (`super`).
self: super: builtins.intersectAttrs super {

# Apply NixOS-specific patches.
Expand Down

0 comments on commit 039c6a6

Please sign in to comment.