1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00

flake-parts-lib: Add importApply

This commit is contained in:
Robert Hensing 2023-05-08 00:48:08 +02:00
parent f3e943c249
commit d0016e0990

View file

@ -216,6 +216,14 @@ let
});
config = (mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt);
};
# Helper function for importing while preserving module location. To be added
# in nixpkgs: https://github.com/NixOS/nixpkgs/pull/230588
# I expect these functions to remain identical. This one will stick around
# for a while to support older nixpkgs-lib.
importApply =
modulePath: staticArgs:
lib.setDefaultModuleLocation modulePath (import modulePath staticArgs);
};
in