mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-15 17:50:53 +00:00
easyOverlay: Support pkgs.system as a fallback
This is required for `exportOverlays` in `digga`, which passes a fake `pkgs` that doesn't have a `pkgs.stdenv`, but does have a `pkgs.system`.
This commit is contained in:
parent
836c38aa2a
commit
30bddfe65b
1 changed files with 6 additions and 1 deletions
|
@ -44,7 +44,12 @@ in
|
||||||
config = {
|
config = {
|
||||||
flake.overlays.default = final: prev:
|
flake.overlays.default = final: prev:
|
||||||
let
|
let
|
||||||
system = prev.stdenv.hostPlatform.system;
|
system =
|
||||||
|
prev.stdenv.hostPlatform.system or (
|
||||||
|
prev.system or (
|
||||||
|
throw "Could not determine the `hostPlatform` of Nixpkgs. Was this overlay loaded as a Nixpkgs overlay, or was it loaded into something else?"
|
||||||
|
)
|
||||||
|
);
|
||||||
perSys = (getSystem system).extendModules {
|
perSys = (getSystem system).extendModules {
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue