build-clan: fix bug where vars generator scripts are built for target system instead of local system

This commit is contained in:
DavHau
2024-12-16 17:14:33 +07:00
parent c3a4e43592
commit 1cbba05055
3 changed files with 75 additions and 15 deletions

View File

@@ -1,4 +1,8 @@
{ lib, self, ... }:
{
lib,
self,
...
}:
let
types = lib.types;
in
@@ -71,13 +75,15 @@ in
pkgsForSystem = lib.mkOption {
type = types.functionTo (types.nullOr types.attrs);
default = _: null;
defaultText = "Lambda :: String -> { ... } | null";
default = _system: null;
defaultText = "system: null";
description = ''
A function that maps from architecture to pkg. `( string -> pkgs )`
If specified this nixpkgs will be only imported once for each system.
This improves performance, but all nipxkgs.* options will be ignored.
This improves performance, but all `nipxkgs.*` options will be ignored.
Returning `null` for a system will fallback to the default behavior of respecting the `nixpkgs.*` options.
'';
};