gytis-ivaskevicius / flake-utils-plus

Use Nix flakes without any fluff.
MIT License
459 stars 52 forks source link

fix: check for system when looking for nixpkgs channels #135

Closed jakehamilton closed 9 months ago

jakehamilton commented 9 months ago

flake-utils-plus currently has a bug to do with finding NixPkgs channels. It checks for legacyPackages.x86_64-linux.nix on each flake input to determine if it is NixPkgs. This typically works, but some flakes may define legacyPackages which can cause issues if they omit the system used for this check (among other issues). The fix adds an additional check to ensure that the entire attribute path legacyPackages.x86_64-linux.nix exists rather than expecting x86_64-linux to always be defined. This avoids the error that would prevent integrating tools like agenix in a flake that uses flake-utils-plus.

See a reproduction here: https://github.com/jakehamilton/fup-channels-bug

jakehamilton commented 9 months ago

Ah, didn't see that another PR fixes this same issue: https://github.com/gytis-ivaskevicius/flake-utils-plus/pull/134

gytis-ivaskevicius commented 9 months ago

Thanks for the effort but I merged the other one

jakehamilton commented 9 months ago

No worries @gytis-ivaskevicius, I hope you are feeling better!