rework: fix all vulnerabilities
runner nix smoke / nix label and flake smoke (push) Failing after 7s

This commit is contained in:
2026-09-08 10:36:38 +00:00
parent 01a0d6e00a
commit 6f80f672f2
17 changed files with 62 additions and 73 deletions
+8 -24
View File
@@ -1,26 +1,10 @@
{ pkgs, writeTextFile, lib, linux-devshell-standalone }:
let
psScriptTemplate = builtins.readFile ./windows-devshell.ps1;
# Get the linux-devshell standalone script content and base64 encode it
linuxDevShellBase64 = lib.removeSuffix "\n"
(builtins.readFile
(pkgs.runCommand "base64-linux-devshell" {}
''
${pkgs.coreutils}/bin/base64 -w 0 ${linux-devshell-standalone} > $out
''));
# Standalone PowerShell script (single file for Windows)
windowsDevShellStandalone = writeTextFile {
name = "windows-devshell.ps1";
executable = false;
text = lib.replaceStrings ["@LINUX_DEVSHELL_BASE64@"] [linuxDevShellBase64] psScriptTemplate;
meta = {
description = "Standalone windows-devshell PowerShell script (single file)";
};
};
in
{ pkgs, linux-devshell-standalone }:
{
windows-devshell-standalone = windowsDevShellStandalone;
windows-devshell-standalone = pkgs.runCommand "windows-devshell.ps1" {
meta.description = "Standalone windows-devshell PowerShell script (single file)";
} ''
linux_dev_shell_base64=$(${pkgs.coreutils}/bin/base64 -w 0 ${linux-devshell-standalone})
${pkgs.gnused}/bin/sed "s|@LINUX_DEVSHELL_BASE64@|$linux_dev_shell_base64|g" \
${./windows-devshell.ps1} > "$out"
'';
}