default.nix: allow apply composition over the package

M  default.nix
This commit is contained in:
Anton-Latukha 2020-06-03 20:33:14 +03:00
parent 6ad93468ec
commit 6548659e77
No known key found for this signature in database
GPG Key ID: 3D84C07E91802E41
1 changed files with 10 additions and 1 deletions

View File

@ -119,6 +119,15 @@ let
haskellPackages = pkgs.haskell.packages.${compiler}.override
overrideHaskellPackages;
listOfSetsOfSwitchExtend =
[
];
funcOnSwitchAplliesFunction = set: object:
if set.switch
then set.function object
else object;
# General description of package
package = haskellPackages.developPackage {
name = "hnix";
@ -162,7 +171,7 @@ let
returnShellEnv = false;
};
composedPackage = package;
composedPackage = pkgs.lib.foldr (funcOnSwitchAplliesFunction) package listOfSetsOfSwitchExtend;
in composedPackage