revert 83ec5a063a
revert vars: use writeShellApplication to shellcheck generators Cannot re-generate the vars for data-mesher or any of our tests anymore cc @DavHau @Qubasa Can we work together to fix this. I like shellchecking but if we loose the ability to add tests thats unfortunate This is blocking: the new 'restic' and 'zerotier' migrations because we need to write integration tests from the beginning.
This commit is contained in:
@@ -16,7 +16,7 @@ let
|
||||
;
|
||||
|
||||
promptToFile = name: ''
|
||||
cat "$prompts"/${name} > "$out"/${name}
|
||||
cat "$prompts/${name}" > "$out/${name}"
|
||||
'';
|
||||
|
||||
promptsToFilesScript = concatMapStrings promptToFile;
|
||||
@@ -25,13 +25,8 @@ let
|
||||
in
|
||||
{
|
||||
finalScript = mkOptionDefault (
|
||||
lib.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "generator-${config.name}";
|
||||
text = ''
|
||||
in="''${in:?}"
|
||||
out="''${out:?}"
|
||||
${if config.prompts == { } then "" else ''prompts="''${prompts:?}"''}
|
||||
pkgs.writeScript "generator-${config.name}" ''
|
||||
set -eu -o pipefail
|
||||
|
||||
export PATH="${makeBinPath config.runtimeInputs}:${pkgs.coreutils}/bin"
|
||||
|
||||
@@ -58,9 +53,7 @@ in
|
||||
''}
|
||||
${promptsToFilesScript filePromptNames}
|
||||
${config.script}
|
||||
'';
|
||||
}
|
||||
)
|
||||
''
|
||||
);
|
||||
|
||||
files = genAttrs filePromptNames (_name: { });
|
||||
|
||||
Reference in New Issue
Block a user