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

Merge pull request #149 from hercules-ci/importApply

flake-parts-lib: Add importApply
This commit is contained in:
Robert Hensing 2023-05-08 12:44:15 +02:00 committed by GitHub
commit 2e844a66a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,6 +218,14 @@ let
}); });
config = (mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt); 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 in