# `checks.script-test-refresh-consumer` — runs ../host-modules/lib/refresh-consumer.nix's # `refresh_unit` and `refresh_consumer` against a stub `systemctl`, under a # locale whose decimal separator is a comma. The cases are in # ./refresh-consumer.sh. # # What runs is the rendered helper, sourced as its callers' scripts include it. { pkgs, ... }: pkgs.runCommand "hyperhive-script-test-refresh-consumer" { HELPER = pkgs.writeText "refresh-consumer.sh" (import ../host-modules/lib/refresh-consumer.nix { }); LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; } '' ${pkgs.bash}/bin/bash ${./refresh-consumer.sh} touch "$out" ''