From be5fbdd94f1b07a5a708ea4d97340e79c86bd77d Mon Sep 17 00:00:00 2001 From: Asa Paparo Date: Fri, 24 Jul 2026 23:12:46 -0500 Subject: [PATCH] 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. --- nixos/modules/services/system/userborn.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/system/userborn.nix b/nixos/modules/services/system/userborn.nix index eeb0f6a40f35..a6042c752c0d 100644 --- a/nixos/modules/services/system/userborn.nix +++ b/nixos/modules/services/system/userborn.nix @@ -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;