mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Merge pull request #98 from hercules-ci/easyOverlay-support-simplistic-fake-pkgs
`easyOverlay`: support simplistic fake pkgs
This commit is contained in:
commit
c089237966
2 changed files with 9 additions and 4 deletions
|
@ -17,13 +17,13 @@ rec {
|
|||
};
|
||||
|
||||
empty = mkFlake
|
||||
{ self = { }; }
|
||||
{ inputs.self = { }; }
|
||||
{
|
||||
systems = [ ];
|
||||
};
|
||||
|
||||
example1 = mkFlake
|
||||
{ self = { }; }
|
||||
{ inputs.self = { }; }
|
||||
{
|
||||
systems = [ "a" "b" ];
|
||||
perSystem = { system, ... }: {
|
||||
|
@ -32,7 +32,7 @@ rec {
|
|||
};
|
||||
|
||||
easyOverlay = mkFlake
|
||||
{ self = { }; }
|
||||
{ inputs.self = { }; }
|
||||
{
|
||||
imports = [ flake-parts.flakeModules.easyOverlay ];
|
||||
systems = [ "a" ];
|
||||
|
|
|
@ -44,7 +44,12 @@ in
|
|||
config = {
|
||||
flake.overlays.default = final: prev:
|
||||
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 {
|
||||
modules = [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue