mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
haskell: comment about configuration-nix.nix's intersectAttrs
This commit is contained in:
parent
2df3b5ca7f
commit
039c6a6dfa
@ -29,6 +29,17 @@
|
|||||||
|
|
||||||
with import ./lib.nix { inherit pkgs; };
|
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 {
|
self: super: builtins.intersectAttrs super {
|
||||||
|
|
||||||
# Apply NixOS-specific patches.
|
# Apply NixOS-specific patches.
|
||||||
|
Loading…
Reference in New Issue
Block a user