nixos/userborn: fix cross compilation with userborn.static.enable
`services.userborn.static = true` causes userborn to build
a `static-userborn` derivation, which directly referenced
`${cfg.package}`, which broke on cross compilation. This commit passes
`cfg.package` as a `nativeBuildInput` so it uses the proper spliced
pkgs, fixes #545478.
This commit is contained in:
@@ -36,8 +36,14 @@ let
|
||||
|
||||
userbornConfigJson = pkgs.writeText "userborn.json" (builtins.toJSON userbornConfig);
|
||||
userbornStaticFiles =
|
||||
pkgs.runCommand "static-userborn" { }
|
||||
"mkdir -p $out; ${lib.getExe cfg.package} ${userbornConfigJson} $out";
|
||||
pkgs.runCommand "static-userborn"
|
||||
{
|
||||
nativeBuildInputs = [ cfg.package ];
|
||||
}
|
||||
''
|
||||
mkdir -p $out
|
||||
userborn ${userbornConfigJson} $out
|
||||
'';
|
||||
previousConfigPath = "/var/lib/userborn/previous-userborn.json";
|
||||
|
||||
immutableEtc = config.system.etc.overlay.enable && !config.system.etc.overlay.mutable;
|
||||
|
||||
Reference in New Issue
Block a user