Skip to content

Commit

Permalink
Add packagePostOverrides parameter to simpleCabalProject2flake
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanovs-4 committed Dec 30, 2022
1 parent 4f79db2 commit cea20ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simpleCabalProject2flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,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 @@ -97,7 +99,10 @@ in
};

packages_ = flake-utils.lib.flattenTree
(getAttrs (packageNames_ pkgs) pkgs.haskellPackages);
(builtins.mapAttrs
(_name: (foldCompose (maybeCall packagePostOverrides { inherit pkgs; })))
(getAttrs (packageNames_ pkgs) pkgs.haskellPackages)
);

getAttrs = names: attrs: pkgs.lib.attrsets.genAttrs names (n: attrs.${n});

Expand Down

0 comments on commit cea20ef

Please sign in to comment.