fix(nix): refactor nixosTest injections for better performance (#8378)

This commit is contained in:
Marc Jakobi 2025-12-29 16:47:03 +01:00 committed by GitHub
parent 36fcb4a423
commit 7efc1b58a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 14 deletions

View file

@ -1,7 +1,7 @@
# NOTE: This file is for testing queries. If evaluated with nix, this will probably error.
{ pkgs, stdenv }: let
{ pkgs, stdenv, lib }: let
match = builtins.match;
in {
in {
regex = builtins.match "^.*[{](.+)[}].*$" "blahblah {something} blahblah" [ "something" ];
regex2 = match "^.*[{](.+)[}].*$" "blahblah {something} blahblah" [ "something" ];
@ -12,7 +12,7 @@ in {
echo "bar" > $out/foo.txt
'';
};
drv2 = pkgs.writeShellApplication {
name = "shellApp";
buildInputs = [];
@ -62,7 +62,7 @@ in {
}
'';
drv12 = {
drv12 = lib.nixos.runTest {
nodes = null;
testScript = ''
print("Hello world!");