push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/nsjail/download.py.config.proto b/windmill-worker/nsjail/download.py.config.proto
index 5c2989417..7896bde7a 100644
--- a/windmill-worker/nsjail/download.py.config.proto
+++ b/windmill-worker/nsjail/download.py.config.proto
@@ -22,17 +22,24 @@ keep_caps: true
keep_env: true
mount_proc: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
mount {
@@ -46,6 +53,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,20 @@
# not a stable interface, do not reference outside the windmill package but make a copy if you need
{
lib,
stdenv,
fetchurl,
}:
{
fetchLibrustyV8 =
args:
fetchurl {
name = "librusty_v8-${args.version}";
url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz";
sha256 = args.shas.${stdenv.hostPlatform.system};
meta = {
inherit (args) version;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
};
}

View File

@@ -0,0 +1,11 @@
# auto-generated file -- DO NOT EDIT!
{ fetchLibrustyV8 }:
fetchLibrustyV8 {
version = "130.0.7";
shas = {
# NOTE; Follows supported platforms of package (see meta.platforms attribute)!
x86_64-linux = "0pdp6h7vbjvq5l9lh25qilmp6xrxg7mj8m263h44f0lv9swnqix6";
aarch64-linux = "0nli54vqcrfh9nkz7ma7230k0xmhcrk0jmfbyxcp3rxybarygvxy";
};
}

View File

@@ -0,0 +1,263 @@
{
lib,
callPackage,
rustPlatform,
fetchFromGitHub,
buildNpmPackage,
bash,
cmake,
cairo,
deno,
go,
lld,
makeWrapper,
nsjail,
openssl,
pango,
pixman,
pkg-config,
python312,
rustfmt,
stdenv,
perl,
_experimental-update-script-combinators,
nix-update-script,
librusty_v8 ? (
callPackage ./librusty_v8.nix {
inherit (callPackage ./fetchers.nix { }) fetchLibrustyV8;
}
),
ui_builder ? (callPackage ./ui_builder.nix { }),
libxml2,
xmlsec,
libxslt,
flock,
powershell,
uv,
bun,
dotnet-sdk_9,
php,
procps,
cargo,
coreutils,
withEnterpriseFeatures ? false,
withClosedSourceFeatures ? false,
}:
let
pname = "windmill";
version = "1.549.1";
src = fetchFromGitHub {
owner = "windmill-labs";
repo = "windmill";
rev = "v${version}";
hash = "sha256-+4cYZCD8iqrrckYWTDCM++SogptXXahfCKN6O8E8HuE=";
};
in
rustPlatform.buildRustPackage (finalAttrs: {
inherit pname version src;
sourceRoot = "${src.name}/backend";
env = {
SQLX_OFFLINE = "true";
FRONTEND_BUILD_DIR = "${finalAttrs.passthru.web-ui}/share/windmill-frontend";
RUSTY_V8_ARCHIVE = librusty_v8;
};
cargoHash = "sha256-m7/72IRbzllAfAlbjKsjGrTaiXzpj2TufLKrTpKLbUU=";
buildFeatures = [
"agent_worker_server"
# "benchmark" # DO NOT ACTIVATE, this is for benchmark testing
#"bigquery"
"cloud"
"csharp"
"default"
"deno_core"
"dind"
#"duckdb"
"embedding"
"flow_testing"
"gcp_trigger"
"http_trigger"
#"java"
"jemalloc"
"kafka"
"license"
"loki"
"mcp"
"mqtt_trigger"
#"mssql"
#"mysql"
"nats"
#"nu"
"oauth2"
"openidconnect"
#"oracledb"
"parquet"
"php"
"postgres_trigger"
"python"
#"ruby"
#"rust" # compiler environment is incomplete
"scoped_cache"
"smtp"
"sqlx"
"sqs_trigger"
"static_frontend"
"websocket"
"zip"
]
++ (lib.optionals withEnterpriseFeatures [
"enterprise_saml"
"enterprise"
"otel"
"prometheus"
"stripe"
"tantivy"
])
++ (lib.optionals withClosedSourceFeatures [ "private" ]);
patches = [
./download.py.config.proto.patch
./python_executor.patch
./python_versions.patch
./run.ansible.config.proto.patch
./run.bash.config.proto.patch
./run.bun.config.proto.patch
./run.csharp.config.proto.patch
./run.go.config.proto.patch
./run.php.config.proto.patch
./run.powershell.config.proto.patch
./run.python3.config.proto.patch
./run.rust.config.proto.patch
./rust_executor.patch
];
postPatch = ''
substituteInPlace windmill-common/src/utils.rs \
--replace-fail 'unknown-version' 'v${version}'
'';
buildInputs = [
openssl
rustfmt
lld
(lib.getLib stdenv.cc.cc)
libxml2
xmlsec
libxslt
];
nativeBuildInputs = [
pkg-config
makeWrapper
cmake # for libz-ng-sys crate
perl
];
# needs a postgres database running
doCheck = false;
postFixup = ''
wrapProgram "$out/bin/windmill" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc ]} \
--prefix PATH : ${
lib.makeBinPath [
# uv searches for python on path as well!
python312
procps # bash_executor
coreutils # bash_executor
]
} \
--set PYTHON_PATH "${python312}/bin/python3" \
--set GO_PATH "${go}/bin/go" \
--set DENO_PATH "${deno}/bin/deno" \
--set NSJAIL_PATH "${nsjail}/bin/nsjail" \
--set FLOCK_PATH "${flock}/bin/flock" \
--set BASH_PATH "${bash}/bin/bash" \
--set POWERSHELL_PATH "${powershell}/bin/pwsh" \
--set BUN_PATH "${bun}/bin/bun" \
--set UV_PATH "${uv}/bin/uv" \
--set DOTNET_PATH "${dotnet-sdk_9}/bin/dotnet" \
--set DOTNET_ROOT "${dotnet-sdk_9}/share/dotnet" \
--set PHP_PATH "${php}/bin/php" \
--set CARGO_PATH "${cargo}/bin/cargo"
'';
passthru.web-ui = buildNpmPackage {
inherit version src;
pname = "windmill-ui";
sourceRoot = "${src.name}/frontend";
npmDepsHash = "sha256-2CBqPDEqKGDIGo7ARK3sxTkFNsTxIa6V1QCtSKDkj4I=";
# without these you get a
# FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
env.NODE_OPTIONS = "--max-old-space-size=8192";
postUnpack = ''
cp ${src}/openflow.openapi.yaml .
'';
# WORKS
npmFlags = [
# Skip "postinstall" script that attempts to download and unpack ui-builder (patching out the url with nix-store path doesn't work)
"--ignore-scripts"
];
preBuild = ''
npm run generate-backend-client
'';
buildInputs = [
pixman
cairo
pango
];
nativeBuildInputs = [
pkg-config
];
installPhase = ''
mkdir -p $out/share
mv build $out/share/windmill-frontend
mkdir -p $out/share/windmill-frontend/static
ln -s ${ui_builder} $out/share/windmill-frontend/static/ui_builder
'';
};
passthru.updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script {
extraArgs = [
"--subpackage"
"web-ui"
];
})
./update-librusty.sh
./update-ui_builder.sh
];
meta = {
changelog = "https://github.com/windmill-labs/windmill/blob/${src.rev}/CHANGELOG.md";
description = "Open-source developer platform to turn scripts into workflows and UIs";
homepage = "https://windmill.dev";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
dit7ya
happysalada
];
mainProgram = "windmill";
# limited by librusty_v8
# nsjail not available on darwin
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
})

View File

@@ -0,0 +1,31 @@
diff --git a/windmill-worker/src/python_executor.rs b/windmill-worker/src/python_executor.rs
index eb6a6e7f30..eb29758c0a 100644
--- a/windmill-worker/src/python_executor.rs
+++ b/windmill-worker/src/python_executor.rs
@@ -273,7 +273,7 @@ pub async fn uv_pip_compile(
UV_CACHE_DIR,
];
- args.extend(["-p", &py_version_str, "--python-preference", "only-managed"]);
+ args.extend(["-p", &py_version_str, "--python-preference", "only-system"]);
if no_cache {
args.extend(["--no-cache"]);
@@ -1332,7 +1332,7 @@ async fn spawn_uv_install(
let _owner;
if let Some(py_path) = py_path.as_ref() {
_owner = format!(
- "-p {} --python-preference only-managed",
+ "-p {} --python-preference only-system",
py_path.as_str() //
);
vars.push(("PY_PATH", &_owner));
@@ -1399,7 +1399,7 @@ async fn spawn_uv_install(
"-p",
py_path.as_str(),
"--python-preference",
- "only-managed", //
+ "only-system", //
]);
} else {
command_args.extend([

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/src/python_versions.rs b/windmill-worker/src/python_versions.rs
index 3d71e9f9ec..c9166b52c6 100644
--- a/windmill-worker/src/python_versions.rs
+++ b/windmill-worker/src/python_versions.rs
@@ -326,6 +326,7 @@ impl PyV {
}
pub async fn list_available_python_versions() -> Vec<Self> {
+ return vec![PyVAlias::Py312.into()];
match Self::list_available_python_versions_inner().await {
Ok(pyvs) => pyvs,
Err(e) => {
@@ -591,6 +592,10 @@ impl PyV {
w_id: &str,
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> error::Result<()> {
+ let v = self.to_string();
+ append_logs(job_id, w_id, format!("\nREQUESTED PYTHON INSTALL IGNORED ({})", v), conn).await;
+ return Err(error::Error::BadConfig(format!("Python is managed through the NixOS system configuration. Change the Windmill instance setting to version '3.12'")));
+
let v = self.to_string();
append_logs(job_id, w_id, format!("\nINSTALLING PYTHON ({})", v), conn).await;
// Create dirs for newly installed python
@@ -695,11 +700,11 @@ impl PyV {
"find",
&self.to_string(),
"--system",
- "--python-preference=only-managed",
+ "--python-preference=only-system",
])
.envs([
("UV_PYTHON_INSTALL_DIR", PY_INSTALL_DIR),
- ("UV_PYTHON_PREFERENCE", "only-managed"),
+ ("UV_PYTHON_PREFERENCE", "only-system"),
])
// .stdout(Stdio::piped())
.stderr(Stdio::piped())

View File

@@ -0,0 +1,44 @@
diff --git a/windmill-worker/nsjail/run.ansible.config.proto b/windmill-worker/nsjail/run.ansible.config.proto
index 65a8ea700..d4c8c2afc 100644
--- a/windmill-worker/nsjail/run.ansible.config.proto
+++ b/windmill-worker/nsjail/run.ansible.config.proto
@@ -18,16 +18,24 @@ keep_caps: false
keep_env: true
mount_proc: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -42,12 +50,14 @@ mount {
src: "/root/.local/share/uv/tools/ansible"
dst: "/root/.local/share/uv/tools/ansible"
is_bind: true
+ mandatory: false
}
mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,46 @@
diff --git a/windmill-worker/nsjail/run.bash.config.proto b/windmill-worker/nsjail/run.bash.config.proto
index 63018f765..d8bb0c0a7 100644
--- a/windmill-worker/nsjail/run.bash.config.proto
+++ b/windmill-worker/nsjail/run.bash.config.proto
@@ -15,10 +15,17 @@ keep_caps: false
keep_env: true
mount_proc: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
@@ -32,6 +39,7 @@ mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
@@ -45,6 +53,7 @@ mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -60,6 +69,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/nsjail/run.bun.config.proto b/windmill-worker/nsjail/run.bun.config.proto
index 527d49cf7..b5e64beec 100644
--- a/windmill-worker/nsjail/run.bun.config.proto
+++ b/windmill-worker/nsjail/run.bun.config.proto
@@ -17,16 +17,24 @@ clone_newcgroup: false
keep_caps: false
keep_env: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
mount {
@@ -47,6 +55,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/nsjail/run.csharp.config.proto b/windmill-worker/nsjail/run.csharp.config.proto
index 389448eff..ee51c1bfb 100644
--- a/windmill-worker/nsjail/run.csharp.config.proto
+++ b/windmill-worker/nsjail/run.csharp.config.proto
@@ -15,16 +15,24 @@ keep_caps: false
keep_env: true
mount_proc: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -40,6 +48,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/nsjail/run.go.config.proto b/windmill-worker/nsjail/run.go.config.proto
index 1ba6f52d5..21614fabb 100644
--- a/windmill-worker/nsjail/run.go.config.proto
+++ b/windmill-worker/nsjail/run.go.config.proto
@@ -14,16 +14,24 @@ clone_newuser: {CLONE_NEWUSER}
keep_caps: false
keep_env: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -39,6 +47,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/nsjail/run.php.config.proto b/windmill-worker/nsjail/run.php.config.proto
index d3752d33b..9e4b19793 100644
--- a/windmill-worker/nsjail/run.php.config.proto
+++ b/windmill-worker/nsjail/run.php.config.proto
@@ -15,16 +15,24 @@ keep_caps: false
keep_env: true
mount_proc: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -40,6 +48,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,38 @@
diff --git a/windmill-worker/nsjail/run.powershell.config.proto b/windmill-worker/nsjail/run.powershell.config.proto
index 93a48d4fe..97dc236e5 100644
--- a/windmill-worker/nsjail/run.powershell.config.proto
+++ b/windmill-worker/nsjail/run.powershell.config.proto
@@ -15,10 +15,17 @@ keep_caps: false
keep_env: true
mount_proc: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
@@ -38,6 +45,7 @@ mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -53,6 +61,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/nsjail/run.python3.config.proto b/windmill-worker/nsjail/run.python3.config.proto
index b49b9cfbf..35241bbd0 100644
--- a/windmill-worker/nsjail/run.python3.config.proto
+++ b/windmill-worker/nsjail/run.python3.config.proto
@@ -18,16 +18,24 @@ keep_caps: false
keep_env: true
mount_proc: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -43,6 +51,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,37 @@
diff --git a/windmill-worker/nsjail/run.rust.config.proto b/windmill-worker/nsjail/run.rust.config.proto
index 3357cd88a..c0a1e9534 100644
--- a/windmill-worker/nsjail/run.rust.config.proto
+++ b/windmill-worker/nsjail/run.rust.config.proto
@@ -14,16 +14,24 @@ clone_newuser: {CLONE_NEWUSER}
keep_caps: false
keep_env: true
+mount {
+ src: "/nix/store"
+ dst: "/nix/store"
+ is_bind: true
+}
+
mount {
src: "/bin"
dst: "/bin"
is_bind: true
+ mandatory: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
+ mandatory: false
}
@@ -39,6 +47,7 @@ mount {
src: "/usr"
dst: "/usr"
is_bind: true
+ mandatory: false
}
mount {

View File

@@ -0,0 +1,13 @@
diff --git a/windmill-worker/src/rust_executor.rs b/windmill-worker/src/rust_executor.rs
index 95fd82210..ed7b298e1 100644
--- a/windmill-worker/src/rust_executor.rs
+++ b/windmill-worker/src/rust_executor.rs
@@ -29,7 +29,7 @@ use crate::SYSTEM_ROOT;
const NSJAIL_CONFIG_RUN_RUST_CONTENT: &str = include_str!("../nsjail/run.rust.config.proto");
lazy_static::lazy_static! {
- static ref HOME_DIR: String = std::env::var("HOME").expect("Could not find the HOME environment variable");
+ static ref HOME_DIR: String = std::env::var("HOME").unwrap_or_else(|_| format!("{}/cargo", windmill_common::worker::ROOT_CACHE_DIR));
static ref CARGO_HOME: String = std::env::var("CARGO_HOME").unwrap_or_else(|_| { CARGO_HOME_DEFAULT.clone() });
static ref RUSTUP_HOME: String = std::env::var("RUSTUP_HOME").unwrap_or_else(|_| { RUSTUP_HOME_DEFAULT.clone() });
static ref CARGO_PATH: String = std::env::var("CARGO_PATH").unwrap_or_else(|_| format!("{}/bin/cargo", CARGO_HOME.as_str()));

View File

@@ -0,0 +1,10 @@
diff --git a/windmill-api-client/bundle.sh b/windmill-api-client/bundle.sh
index 0fe4b172..bd66b49f 100644
--- a/windmill-api-client/bundle.sh
+++ b/windmill-api-client/bundle.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-npx swagger-cli bundle ../windmill-api/openapi.yaml > bundled.json
\ No newline at end of file
+swagger-cli bundle ../windmill-api/openapi.yaml > bundled.json

View File

@@ -0,0 +1,8 @@
# auto-generated file -- DO NOT EDIT!
{ fetchzip }:
fetchzip {
url = "https://pub-06154ed168a24e73a86ab84db6bf15d8.r2.dev/ui_builder-d44b577.tar.gz";
sha256 = "0wx9jq9h092c7y4x7dycvj10wna2q22062nvvzzb6646s6q2iycg";
stripRoot = false;
}

View File

@@ -0,0 +1,45 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p gnugrep gnused nix jq
# shellcheck shell=bash
set -eu -o pipefail
echo "librusty_v8: UPDATING"
# ASSUMES; The Cargo.lock file is located at <REPO>/backend/Cargo.toml
WINDMILL_LATEST_VERSION=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://api.github.com/repos/windmill-labs/windmill/releases/latest" | jq --raw-output .tag_name)
CARGO_LOCK=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://github.com/windmill-labs/windmill/raw/$WINDMILL_LATEST_VERSION/backend/Cargo.lock")
PACKAGE_DIR=$(dirname "$(readlink --canonicalize-existing "${BASH_SOURCE[0]}")")
OUTPUT_FILE="$PACKAGE_DIR/librusty_v8.nix"
NEW_VERSION=$(echo "$CARGO_LOCK" | grep --after-context 5 'name = "v8"' | grep 'version =' | sed -E 's/version = "//;s/"//')
CURRENT_VERSION=""
if [ -f "$OUTPUT_FILE" ]; then
CURRENT_VERSION="$(grep 'version =' "$OUTPUT_FILE" | sed -E 's/version = "//;s/"//')"
fi
if [ "$CURRENT_VERSION" == "$NEW_VERSION" ]; then
echo "No update needed, $CURRENT_VERSION is already latest"
exit 0
fi
TEMP_FILE="$OUTPUT_FILE.tmp"
cat > "$TEMP_FILE" <<EOF
# auto-generated file -- DO NOT EDIT!
{ fetchLibrustyV8 }:
fetchLibrustyV8 {
version = "$NEW_VERSION";
shas = {
# NOTE; Follows supported platforms of package (see meta.platforms attribute)!
x86_64-linux = "$(nix-prefetch-url --type sha256 https://github.com/denoland/rusty_v8/releases/download/v"$NEW_VERSION"/librusty_v8_release_x86_64-unknown-linux-gnu.a.gz)";
aarch64-linux = "$(nix-prefetch-url --type sha256 https://github.com/denoland/rusty_v8/releases/download/v"$NEW_VERSION"/librusty_v8_release_aarch64-unknown-linux-gnu.a.gz)";
};
}
EOF
mv "$TEMP_FILE" "$OUTPUT_FILE"
echo "librusty_v8: UPDATE DONE"

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p gnugrep gnused nix jq
# shellcheck shell=bash
set -eu -o pipefail
echo "Windmill UI builder: UPDATING"
# ASSUMES; The UI builder package is referenced in post-install script "untar_ui_builder.js"
# REF; https://github.com/windmill-labs/windmill/blob/205618af0a60b6bf5fcdd80f2b23c3b490ddbc00/frontend/scripts/untar_ui_builder.js#L23
WINDMILL_LATEST_VERSION=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://api.github.com/repos/windmill-labs/windmill/releases/latest" | jq --raw-output .tag_name)
UI_BUILDER_SCRIPT=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://github.com/windmill-labs/windmill/raw/$WINDMILL_LATEST_VERSION/frontend/scripts/untar_ui_builder.js")
PACKAGE_DIR=$(dirname "$(readlink --canonicalize-existing "${BASH_SOURCE[0]}")")
OUTPUT_FILE="$PACKAGE_DIR/ui_builder.nix"
NEW_URL=$(echo "$UI_BUILDER_SCRIPT" | sed --quiet --regexp-extended "s/.*tarUrl\s*=\s*'([^']+)['].*/\1/p")
TEMP_FILE="$OUTPUT_FILE.tmp"
cat > "$TEMP_FILE" <<EOF
# auto-generated file -- DO NOT EDIT!
{ fetchzip }:
fetchzip {
url = "$NEW_URL";
sha256 = "$(nix-prefetch-url --type sha256 --unpack "$NEW_URL")";
stripRoot = false;
}
EOF
mv "$TEMP_FILE" "$OUTPUT_FILE"
echo "Windmill UI builder: UPDATE DONE"