Skip to content

Commit

Permalink
lib.compose{Many,}Extensions: Make compatible with nix flake check
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Aug 26, 2021
1 parent bc52dda commit d09222e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/fixed-points.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ rec {
# into one where changes made in the first are available in the
# 'super' of the second
composeExtensions =
f: g: self: super:
let fApplied = f self super;
super' = super // fApplied;
in fApplied // g self super';
f: g: final: prev:
let fApplied = f final prev;
prev' = prev // fApplied;
in fApplied // g final prev';

# Compose several extending functions of the type expected by 'extends' into
# one where changes made in preceding functions are made available to
Expand All @@ -84,7 +84,7 @@ rec {
# composeManyExtensions : [packageSet -> packageSet -> packageSet] -> packageSet -> packageSet -> packageSet
# ^final ^prev ^overrides ^final ^prev ^overrides
composeManyExtensions =
lib.foldr (x: y: composeExtensions x y) (self: super: {});
lib.foldr (x: y: composeExtensions x y) (final: prev: {});

# Create an overridable, recursive attribute set. For example:
#
Expand Down

0 comments on commit d09222e

Please sign in to comment.