diff --git a/ChangeLog.md b/ChangeLog.md index 02182ef..6103b3b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,26 @@ + +# 2023-05-30 + + - Fix a strictness issue in `perInput`, affecting `inputs'`, `self'`. + This has caused infinite recursions and potentially performance issues since + the introduction of these module arguments. + +# 2023-05-08 + + - Add [`importApply`](https://flake.parts/define-module-in-separate-file.html?highlight=importApply#importApply) for bringing variables from the flake scope into module files. + + - Add `mkDeferredModuleOption` as a generic name for the implementation of `mkPerSystemOption`. + +# 2023-03-26 + + - Add preliminary support for `disabledModules` for modules exposed via the importable `flakeModules` module. + This requires a Nixpkgs of 2023-03-09 or newer. + +# 2023-01-05 + + - Add importable `easyOverlay` module for defining an overlay "easily" by reusing `perSystem`. + This is not for consuming overlays. + # 2022-12-25 - Added a new `flake.flakeModules` option so a flake can expose a module diff --git a/dev/tests/eval-tests.nix b/dev/tests/eval-tests.nix index e0dedae..437ee1a 100644 --- a/dev/tests/eval-tests.nix +++ b/dev/tests/eval-tests.nix @@ -35,6 +35,18 @@ rec { }; }; + packagesNonStrictInDevShells = mkFlake + { inputs.self = packagesNonStrictInDevShells; /* approximation */ } + { + systems = [ "a" "b" ]; + perSystem = { system, self', ... }: { + packages.hello = pkg system "hello"; + packages.default = self'.packages.hello; + devShells = throw "can't be strict in perSystem.devShells!"; + }; + flake.devShells = throw "can't be strict in devShells!"; + }; + easyOverlay = mkFlake { inputs.self = { }; } { @@ -148,6 +160,8 @@ rec { assert flakeModulesDisable.test123 == "option123"; + assert packagesNonStrictInDevShells.packages.a.default == pkg "a" "hello"; + ok; result = runTests "ok"; diff --git a/modules/transposition.nix b/modules/transposition.nix index 01ceb93..a89b9c8 100644 --- a/modules/transposition.nix +++ b/modules/transposition.nix @@ -61,10 +61,7 @@ in system: flake: mapAttrs (attrName: attrConfig: flake.${attrName}.${system}) - (filterAttrs - (attrName: attrConfig: flake?${attrName}.${system}) - config.transposition - ); + config.transposition; perSystem = { options =