Skip to content

Commit

Permalink
Add packagePostOverrides parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanovs-4 committed Aug 6, 2022
1 parent 4bca0aa commit 4f79db2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ let
else
obj;

foldCompose = builtins.foldl'
(f: g: a: f (g a))
(x: x);

lib = {
inherit
simpleCabal2flake
Expand All @@ -47,6 +51,7 @@ let
loadOverlay
maybeImport
maybeCall
foldCompose
;
};
in
Expand Down
5 changes: 4 additions & 1 deletion simpleCabal2flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
compiler ? null
, # overlays that will be used to build the package but will not be added to self.overlay
localOverlays ? []
# list of override functions from haskell.lib
, packagePostOverrides ? {pkgs}: []
}:

let
Expand Down Expand Up @@ -78,7 +80,8 @@ in
};

packages_ = flake-utils.lib.flattenTree {
"${name}" = pkgs.haskellPackages.${name};
"${name}" = foldCompose (maybeCall packagePostOverrides { inherit pkgs; })
pkgs.haskellPackages.${name};
};

in {
Expand Down

0 comments on commit 4f79db2

Please sign in to comment.