tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Add missing dependencies and restore working runtimes
Bert Proesmans
11 months ago
7683f254
5317e562
+526
-72
13 changed files
expand all
collapse all
unified
split
pkgs
by-name
wi
windmill
download.py.config.proto.patch
package.nix
python_executor.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
+37
pkgs/by-name/wi/windmill/download.py.config.proto.patch
···
1
1
+
diff --git a/windmill-worker/nsjail/download.py.config.proto b/windmill-worker/nsjail/download.py.config.proto
2
2
+
index 5c2989417..7896bde7a 100644
3
3
+
--- a/windmill-worker/nsjail/download.py.config.proto
4
4
+
+++ b/windmill-worker/nsjail/download.py.config.proto
5
5
+
@@ -22,17 +22,24 @@ keep_caps: true
6
6
+
keep_env: true
7
7
+
mount_proc: true
8
8
+
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+
+ is_bind: true
13
13
+
+}
14
14
+
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
19
19
+
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
23
23
+
src: "/lib"
24
24
+
dst: "/lib"
25
25
+
is_bind: true
26
26
+
+ mandatory: false
27
27
+
}
28
28
+
29
29
+
mount {
30
30
+
@@ -46,6 +53,7 @@ mount {
31
31
+
src: "/usr"
32
32
+
dst: "/usr"
33
33
+
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
+84
-21
pkgs/by-name/wi/windmill/package.nix
···
22
22
rustfmt,
23
23
stdenv,
24
24
swagger-cli,
25
25
+
perl,
25
26
_experimental-update-script-combinators,
26
27
nix-update-script,
27
28
writeScript,
···
30
31
inherit (callPackage ./fetchers.nix { }) fetchLibrustyV8;
31
32
}
32
33
),
34
34
+
libxml2,
35
35
+
xmlsec,
36
36
+
libxslt,
37
37
+
flock,
38
38
+
powershell,
39
39
+
uv,
40
40
+
bun,
41
41
+
dotnet-sdk_9,
42
42
+
php,
43
43
+
procps,
44
44
+
cargo,
45
45
+
coreutils,
46
46
+
withEnterpriseFeatures ? false,
33
47
}:
34
48
35
49
let
···
42
56
rev = "v${version}";
43
57
hash = "sha256-JhgqBXiX0ClEQZkWl7YBsBlQHk2Jp4jIdHy5CDvdoAM=";
44
58
};
45
45
-
46
46
-
pythonEnv = python3.withPackages (ps: [ ps.pip-tools ]);
47
59
in
48
60
rustPlatform.buildRustPackage (finalAttrs: {
49
61
inherit pname version src;
···
65
77
};
66
78
};
67
79
80
80
+
buildFeatures =
81
81
+
[
82
82
+
"embedding"
83
83
+
"parquet"
84
84
+
"prometheus"
85
85
+
"openidconnect"
86
86
+
"cloud"
87
87
+
"jemalloc"
88
88
+
"deno_core"
89
89
+
"license"
90
90
+
"http_trigger"
91
91
+
"zip"
92
92
+
"oauth2"
93
93
+
"kafka"
94
94
+
"otel"
95
95
+
"dind"
96
96
+
"php"
97
97
+
"mysql"
98
98
+
"mssql"
99
99
+
"bigquery"
100
100
+
"websocket"
101
101
+
"python"
102
102
+
"smtp"
103
103
+
"csharp"
104
104
+
"static_frontend"
105
105
+
# "rust" # compiler environment is incomplete
106
106
+
]
107
107
+
++ (lib.optionals withEnterpriseFeatures [
108
108
+
"enterprise"
109
109
+
"enterprise_saml"
110
110
+
"tantivy"
111
111
+
"stripe"
112
112
+
]);
113
113
+
68
114
patches = [
69
69
-
./swagger-cli.patch
115
115
+
./download.py.config.proto.patch
116
116
+
./python_executor.patch
117
117
+
./run.ansible.config.proto.patch
118
118
+
./run.bash.config.proto.patch
119
119
+
./run.bun.config.proto.patch
120
120
+
./run.csharp.config.proto.patch
70
121
./run.go.config.proto.patch
122
122
+
./run.php.config.proto.patch
123
123
+
./run.powershell.config.proto.patch
71
124
./run.python3.config.proto.patch
72
72
-
./run.bash.config.proto.patch
125
125
+
./run.rust.config.proto.patch
126
126
+
./rust_executor.patch
127
127
+
./swagger-cli.patch
73
128
];
74
129
75
130
postPatch = ''
76
76
-
substituteInPlace windmill-worker/src/bash_executor.rs \
77
77
-
--replace '"/bin/bash"' '"${bash}/bin/bash"'
78
78
-
79
79
-
substituteInPlace windmill-api/src/lib.rs \
80
80
-
--replace 'unknown-version' 'v${version}'
131
131
+
substituteInPlace windmill-common/src/utils.rs \
132
132
+
--replace-fail 'unknown-version' 'v${version}'
81
133
82
82
-
substituteInPlace src/main.rs \
83
83
-
--replace 'unknown-version' 'v${version}'
134
134
+
substituteInPlace windmill-worker/src/python_executor.rs \
135
135
+
--replace-fail 'unknown_system_python_version' '${python3.version}'
84
136
'';
85
137
86
138
buildInputs = [
···
88
140
rustfmt
89
141
lld
90
142
(lib.getLib stdenv.cc.cc)
143
143
+
libxml2
144
144
+
xmlsec
145
145
+
libxslt
91
146
];
92
147
93
148
nativeBuildInputs = [
94
149
pkg-config
95
150
makeWrapper
96
151
cmake # for libz-ng-sys crate
152
152
+
perl
97
153
];
98
154
99
155
# needs a postgres database running
100
156
doCheck = false;
101
157
158
158
+
# TODO; Check if the rpath is still required
159
159
+
# patchelf --set-rpath ${lib.makeLibraryPath [ openssl ]} $out/bin/windmill
102
160
postFixup = ''
103
103
-
patchelf --set-rpath ${lib.makeLibraryPath [ openssl ]} $out/bin/windmill
104
104
-
105
161
wrapProgram "$out/bin/windmill" \
162
162
+
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc ]} \
106
163
--prefix PATH : ${
107
164
lib.makeBinPath [
108
108
-
go
109
109
-
pythonEnv
110
110
-
deno
111
111
-
nsjail
112
112
-
bash
165
165
+
python3 # uv searches PATH for system python
166
166
+
procps # bash_executor
167
167
+
coreutils # bash_executor
113
168
]
114
169
} \
115
115
-
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc ]} \
116
116
-
--set PYTHON_PATH "${pythonEnv}/bin/python3" \
170
170
+
--set PYTHON_PATH "${python3}/bin/python3" \
117
171
--set GO_PATH "${go}/bin/go" \
118
172
--set DENO_PATH "${deno}/bin/deno" \
119
119
-
--set NSJAIL_PATH "${nsjail}/bin/nsjail"
173
173
+
--set NSJAIL_PATH "${nsjail}/bin/nsjail" \
174
174
+
--set FLOCK_PATH "${flock}/bin/flock" \
175
175
+
--set BASH_PATH "${bash}/bin/bash" \
176
176
+
--set POWERSHELL_PATH "${powershell}/bin/pwsh" \
177
177
+
--set BUN_PATH "${bun}/bin/bun" \
178
178
+
--set UV_PATH "${uv}/bin/uv" \
179
179
+
--set DOTNET_PATH "${dotnet-sdk_9}/bin/dotnet" \
180
180
+
--set DOTNET_ROOT "${dotnet-sdk_9}/share/dotnet" \
181
181
+
--set PHP_PATH "${php}/bin/php" \
182
182
+
--set CARGO_PATH "${cargo}/bin/cargo"
120
183
'';
121
184
122
185
passthru.web-ui = buildNpmPackage {
+100
pkgs/by-name/wi/windmill/python_executor.patch
···
1
1
+
diff --git a/windmill-worker/src/python_executor.rs b/windmill-worker/src/python_executor.rs
2
2
+
index 1180652d3..7b4ccf6cf 100644
3
3
+
--- a/windmill-worker/src/python_executor.rs
4
4
+
+++ b/windmill-worker/src/python_executor.rs
5
5
+
@@ -290,70 +290,8 @@ impl PyVersion {
6
6
+
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
7
7
+
) -> error::Result<()> {
8
8
+
let v = self.to_string_with_dot();
9
9
+
- append_logs(job_id, w_id, format!("\nINSTALLING PYTHON ({})", v), db).await;
10
10
+
- // Create dirs for newly installed python
11
11
+
- // If we dont do this, NSJAIL will not be able to mount cache
12
12
+
- // For the default version directory created during startup (main.rs)
13
13
+
- DirBuilder::new()
14
14
+
- .recursive(true)
15
15
+
- .create(self.to_cache_dir())
16
16
+
- .await
17
17
+
- .expect("could not create initial worker dir");
18
18
+
-
19
19
+
- let logs = String::new();
20
20
+
-
21
21
+
- #[cfg(windows)]
22
22
+
- let uv_cmd = "uv";
23
23
+
-
24
24
+
- #[cfg(unix)]
25
25
+
- let uv_cmd = UV_PATH.as_str();
26
26
+
-
27
27
+
- let mut child_cmd = Command::new(uv_cmd);
28
28
+
- child_cmd
29
29
+
- .env_clear()
30
30
+
- .env("HOME", HOME_ENV.to_string())
31
31
+
- .env("PATH", PATH_ENV.to_string())
32
32
+
- .envs(PROXY_ENVS.clone())
33
33
+
- .args(["python", "install", v, "--python-preference=only-managed"])
34
34
+
- // TODO: Do we need these?
35
35
+
- .envs([("UV_PYTHON_INSTALL_DIR", PY_INSTALL_DIR)])
36
36
+
- .stdout(Stdio::piped())
37
37
+
- .stderr(Stdio::piped());
38
38
+
-
39
39
+
- #[cfg(windows)]
40
40
+
- {
41
41
+
- child_cmd
42
42
+
- .env("SystemRoot", SYSTEM_ROOT.as_str())
43
43
+
- .env("USERPROFILE", crate::USERPROFILE_ENV.as_str())
44
44
+
- .env(
45
45
+
- "TMP",
46
46
+
- std::env::var("TMP").unwrap_or_else(|_| String::from("/tmp")),
47
47
+
- )
48
48
+
- .env(
49
49
+
- "LOCALAPPDATA",
50
50
+
- std::env::var("LOCALAPPDATA")
51
51
+
- .unwrap_or_else(|_| format!("{}\\AppData\\Local", HOME_ENV.as_str())),
52
52
+
- );
53
53
+
- }
54
54
+
-
55
55
+
- let child_process = start_child_process(child_cmd, "uv").await?;
56
56
+
-
57
57
+
- append_logs(&job_id, &w_id, logs, db).await;
58
58
+
- handle_child(
59
59
+
- job_id,
60
60
+
- db,
61
61
+
- mem_peak,
62
62
+
- &mut None,
63
63
+
- child_process,
64
64
+
- false,
65
65
+
- worker_name,
66
66
+
- &w_id,
67
67
+
- "uv",
68
68
+
- None,
69
69
+
- false,
70
70
+
- occupancy_metrics,
71
71
+
- )
72
72
+
- .await
73
73
+
+ append_logs(job_id, w_id, format!("\nREQUESTED PYTHON INSTALL IGNORED ({})", v), db).await;
74
74
+
+ Err(error::Error::BadConfig(format!("Python is managed through the NixOS system configuration. Change the Windmill instance setting to version 'unknown_system_python_version'")))
75
75
+
}
76
76
+
async fn find_python(self) -> error::Result<Option<String>> {
77
77
+
#[cfg(windows)]
78
78
+
@@ -391,11 +329,11 @@ impl PyVersion {
79
79
+
"find",
80
80
+
self.to_string_with_dot(),
81
81
+
"--system",
82
82
+
- "--python-preference=only-managed",
83
83
+
+ "--python-preference=only-system",
84
84
+
])
85
85
+
.envs([
86
86
+
("UV_PYTHON_INSTALL_DIR", PY_INSTALL_DIR),
87
87
+
- ("UV_PYTHON_PREFERENCE", "only-managed"),
88
88
+
+ ("UV_PYTHON_PREFERENCE", "only-system"),
89
89
+
])
90
90
+
// .stdout(Stdio::piped())
91
91
+
.stderr(Stdio::piped())
92
92
+
@@ -561,7 +499,7 @@ pub async fn uv_pip_compile(
93
93
+
"-p",
94
94
+
&py_version.to_string_with_dot(),
95
95
+
"--python-preference",
96
96
+
- "only-managed",
97
97
+
+ "only-system",
98
98
+
]);
99
99
+
100
100
+
if no_cache {
+44
pkgs/by-name/wi/windmill/run.ansible.config.proto.patch
···
1
1
+
diff --git a/windmill-worker/nsjail/run.ansible.config.proto b/windmill-worker/nsjail/run.ansible.config.proto
2
2
+
index 65a8ea700..d4c8c2afc 100644
3
3
+
--- a/windmill-worker/nsjail/run.ansible.config.proto
4
4
+
+++ b/windmill-worker/nsjail/run.ansible.config.proto
5
5
+
@@ -18,16 +18,24 @@ keep_caps: false
6
6
+
keep_env: true
7
7
+
mount_proc: true
8
8
+
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+
+ is_bind: true
13
13
+
+}
14
14
+
+
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
19
19
+
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
23
23
+
src: "/lib"
24
24
+
dst: "/lib"
25
25
+
is_bind: true
26
26
+
+ mandatory: false
27
27
+
}
28
28
+
29
29
+
30
30
+
@@ -42,12 +50,14 @@ mount {
31
31
+
src: "/root/.local/share/uv/tools/ansible"
32
32
+
dst: "/root/.local/share/uv/tools/ansible"
33
33
+
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
38
38
+
src: "/usr"
39
39
+
dst: "/usr"
40
40
+
is_bind: true
41
41
+
+ mandatory: false
42
42
+
}
43
43
+
44
44
+
mount {
+22
-17
pkgs/by-name/wi/windmill/run.bash.config.proto.patch
···
1
1
-
diff --git a/windmill-worker/nsjail/run.bash.config.proto b/backend/windmill-worker/nsjail/run.bash.config.proto
2
2
-
index e93e6b45..bbedb165 100644
1
1
+
diff --git a/windmill-worker/nsjail/run.bash.config.proto b/windmill-worker/nsjail/run.bash.config.proto
2
2
+
index 63018f765..d8bb0c0a7 100644
3
3
--- a/windmill-worker/nsjail/run.bash.config.proto
4
4
+++ b/windmill-worker/nsjail/run.bash.config.proto
5
5
-
@@ -18,6 +18,12 @@ clone_newuser: {CLONE_NEWUSER}
6
6
-
keep_caps: false
5
5
+
@@ -15,10 +15,17 @@ keep_caps: false
7
6
keep_env: true
7
7
+
mount_proc: true
8
8
9
9
+mount {
10
10
-
+ src: "/nix/store"
11
11
-
+ dst: "/nix/store"
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+ is_bind: true
13
13
+}
14
14
+
15
15
mount {
16
16
src: "/bin"
17
17
dst: "/bin"
18
18
-
@@ -25,6 +31,7 @@ mount {
18
18
+
is_bind: true
19
19
+
+ mandatory: false
19
20
}
20
21
21
22
mount {
23
23
+
@@ -32,6 +39,7 @@ mount {
24
24
+
src: "/bin"
25
25
+
dst: "/bin"
26
26
+
is_bind: true
22
27
+ mandatory: false
28
28
+
}
29
29
+
30
30
+
mount {
31
31
+
@@ -45,6 +53,7 @@ mount {
23
32
src: "/lib"
24
33
dst: "/lib"
25
34
is_bind: true
26
26
-
@@ -32,6 +39,7 @@ mount {
27
27
-
28
28
-
29
29
-
mount {
30
35
+ mandatory: false
31
31
-
src: "/lib64"
32
32
-
dst: "/lib64"
33
33
-
is_bind: true
34
34
-
@@ -39,6 +47,7 @@ mount {
36
36
+
}
35
37
36
38
37
37
-
mount {
38
38
-
+ mandatory: false
39
39
+
@@ -60,6 +69,7 @@ mount {
39
40
src: "/usr"
40
41
dst: "/usr"
41
42
is_bind: true
43
43
+
+ mandatory: false
44
44
+
}
45
45
+
46
46
+
mount {
+37
pkgs/by-name/wi/windmill/run.bun.config.proto.patch
···
1
1
+
diff --git a/windmill-worker/nsjail/run.bun.config.proto b/windmill-worker/nsjail/run.bun.config.proto
2
2
+
index 527d49cf7..b5e64beec 100644
3
3
+
--- a/windmill-worker/nsjail/run.bun.config.proto
4
4
+
+++ b/windmill-worker/nsjail/run.bun.config.proto
5
5
+
@@ -17,16 +17,24 @@ clone_newcgroup: false
6
6
+
keep_caps: false
7
7
+
keep_env: true
8
8
+
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+
+ is_bind: true
13
13
+
+}
14
14
+
+
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
19
19
+
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
23
23
+
src: "/lib"
24
24
+
dst: "/lib"
25
25
+
is_bind: true
26
26
+
+ mandatory: false
27
27
+
}
28
28
+
29
29
+
mount {
30
30
+
@@ -47,6 +55,7 @@ mount {
31
31
+
src: "/usr"
32
32
+
dst: "/usr"
33
33
+
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
+37
pkgs/by-name/wi/windmill/run.csharp.config.proto.patch
···
1
1
+
diff --git a/windmill-worker/nsjail/run.csharp.config.proto b/windmill-worker/nsjail/run.csharp.config.proto
2
2
+
index 389448eff..ee51c1bfb 100644
3
3
+
--- a/windmill-worker/nsjail/run.csharp.config.proto
4
4
+
+++ b/windmill-worker/nsjail/run.csharp.config.proto
5
5
+
@@ -15,16 +15,24 @@ keep_caps: false
6
6
+
keep_env: true
7
7
+
mount_proc: true
8
8
+
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+
+ is_bind: true
13
13
+
+}
14
14
+
+
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
19
19
+
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
23
23
+
src: "/lib"
24
24
+
dst: "/lib"
25
25
+
is_bind: true
26
26
+
+ mandatory: false
27
27
+
}
28
28
+
29
29
+
30
30
+
@@ -40,6 +48,7 @@ mount {
31
31
+
src: "/usr"
32
32
+
dst: "/usr"
33
33
+
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
+20
-17
pkgs/by-name/wi/windmill/run.go.config.proto.patch
···
1
1
diff --git a/windmill-worker/nsjail/run.go.config.proto b/windmill-worker/nsjail/run.go.config.proto
2
2
-
index 3af548d1..39ff4da7 100644
2
2
+
index 1ba6f52d5..21614fabb 100644
3
3
--- a/windmill-worker/nsjail/run.go.config.proto
4
4
+++ b/windmill-worker/nsjail/run.go.config.proto
5
5
-
@@ -25,6 +25,13 @@ mount {
6
6
-
}
5
5
+
@@ -14,16 +14,24 @@ clone_newuser: {CLONE_NEWUSER}
6
6
+
keep_caps: false
7
7
+
keep_env: true
7
8
8
8
-
mount {
9
9
-
+ src: "/nix/store"
10
10
-
+ dst: "/nix/store"
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
11
12
+ is_bind: true
12
13
+}
13
14
+
14
14
-
+mount {
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
15
19
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
16
23
src: "/lib"
17
24
dst: "/lib"
18
25
is_bind: true
19
19
-
@@ -32,6 +39,7 @@ mount {
20
20
-
21
21
-
22
22
-
mount {
23
26
+ mandatory: false
24
24
-
src: "/lib64"
25
25
-
dst: "/lib64"
26
26
-
is_bind: true
27
27
-
@@ -39,6 +47,7 @@ mount {
27
27
+
}
28
28
29
29
30
30
-
mount {
31
31
-
+ mandatory: false
30
30
+
@@ -39,6 +47,7 @@ mount {
32
31
src: "/usr"
33
32
dst: "/usr"
34
33
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
+37
pkgs/by-name/wi/windmill/run.php.config.proto.patch
···
1
1
+
diff --git a/windmill-worker/nsjail/run.php.config.proto b/windmill-worker/nsjail/run.php.config.proto
2
2
+
index d3752d33b..9e4b19793 100644
3
3
+
--- a/windmill-worker/nsjail/run.php.config.proto
4
4
+
+++ b/windmill-worker/nsjail/run.php.config.proto
5
5
+
@@ -15,16 +15,24 @@ keep_caps: false
6
6
+
keep_env: true
7
7
+
mount_proc: true
8
8
+
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+
+ is_bind: true
13
13
+
+}
14
14
+
+
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
19
19
+
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
23
23
+
src: "/lib"
24
24
+
dst: "/lib"
25
25
+
is_bind: true
26
26
+
+ mandatory: false
27
27
+
}
28
28
+
29
29
+
30
30
+
@@ -40,6 +48,7 @@ mount {
31
31
+
src: "/usr"
32
32
+
dst: "/usr"
33
33
+
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
+38
pkgs/by-name/wi/windmill/run.powershell.config.proto.patch
···
1
1
+
diff --git a/windmill-worker/nsjail/run.powershell.config.proto b/windmill-worker/nsjail/run.powershell.config.proto
2
2
+
index 93a48d4fe..97dc236e5 100644
3
3
+
--- a/windmill-worker/nsjail/run.powershell.config.proto
4
4
+
+++ b/windmill-worker/nsjail/run.powershell.config.proto
5
5
+
@@ -15,10 +15,17 @@ keep_caps: false
6
6
+
keep_env: true
7
7
+
mount_proc: true
8
8
+
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+
+ is_bind: true
13
13
+
+}
14
14
+
+
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
19
19
+
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
23
23
+
@@ -38,6 +45,7 @@ mount {
24
24
+
src: "/lib"
25
25
+
dst: "/lib"
26
26
+
is_bind: true
27
27
+
+ mandatory: false
28
28
+
}
29
29
+
30
30
+
31
31
+
@@ -53,6 +61,7 @@ mount {
32
32
+
src: "/usr"
33
33
+
dst: "/usr"
34
34
+
is_bind: true
35
35
+
+ mandatory: false
36
36
+
}
37
37
+
38
38
+
mount {
+20
-17
pkgs/by-name/wi/windmill/run.python3.config.proto.patch
···
1
1
diff --git a/windmill-worker/nsjail/run.python3.config.proto b/windmill-worker/nsjail/run.python3.config.proto
2
2
-
index 9f106c23..9da2d2a8 100644
2
2
+
index b49b9cfbf..35241bbd0 100644
3
3
--- a/windmill-worker/nsjail/run.python3.config.proto
4
4
+++ b/windmill-worker/nsjail/run.python3.config.proto
5
5
-
@@ -27,6 +27,13 @@ mount {
6
6
-
}
5
5
+
@@ -18,16 +18,24 @@ keep_caps: false
6
6
+
keep_env: true
7
7
+
mount_proc: true
7
8
8
8
-
mount {
9
9
-
+ src: "/nix/store"
10
10
-
+ dst: "/nix/store"
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
11
12
+ is_bind: true
12
13
+}
13
14
+
14
14
-
+mount {
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
15
19
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
16
23
src: "/lib"
17
24
dst: "/lib"
18
25
is_bind: true
19
19
-
@@ -34,6 +35,7 @@ mount {
20
20
-
21
21
-
22
22
-
mount {
23
26
+ mandatory: false
24
24
-
src: "/lib64"
25
25
-
dst: "/lib64"
26
26
-
is_bind: true
27
27
-
@@ -41,6 +43,7 @@ mount {
27
27
+
}
28
28
29
29
30
30
-
mount {
31
31
-
+ mandatory: false
30
30
+
@@ -43,6 +51,7 @@ mount {
32
31
src: "/usr"
33
32
dst: "/usr"
34
33
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
+37
pkgs/by-name/wi/windmill/run.rust.config.proto.patch
···
1
1
+
diff --git a/windmill-worker/nsjail/run.rust.config.proto b/windmill-worker/nsjail/run.rust.config.proto
2
2
+
index 3357cd88a..c0a1e9534 100644
3
3
+
--- a/windmill-worker/nsjail/run.rust.config.proto
4
4
+
+++ b/windmill-worker/nsjail/run.rust.config.proto
5
5
+
@@ -14,16 +14,24 @@ clone_newuser: {CLONE_NEWUSER}
6
6
+
keep_caps: false
7
7
+
keep_env: true
8
8
+
9
9
+
+mount {
10
10
+
+ src: "/nix/store"
11
11
+
+ dst: "/nix/store"
12
12
+
+ is_bind: true
13
13
+
+}
14
14
+
+
15
15
+
mount {
16
16
+
src: "/bin"
17
17
+
dst: "/bin"
18
18
+
is_bind: true
19
19
+
+ mandatory: false
20
20
+
}
21
21
+
22
22
+
mount {
23
23
+
src: "/lib"
24
24
+
dst: "/lib"
25
25
+
is_bind: true
26
26
+
+ mandatory: false
27
27
+
}
28
28
+
29
29
+
30
30
+
@@ -39,6 +47,7 @@ mount {
31
31
+
src: "/usr"
32
32
+
dst: "/usr"
33
33
+
is_bind: true
34
34
+
+ mandatory: false
35
35
+
}
36
36
+
37
37
+
mount {
+13
pkgs/by-name/wi/windmill/rust_executor.patch
···
1
1
+
diff --git a/windmill-worker/src/rust_executor.rs b/windmill-worker/src/rust_executor.rs
2
2
+
index 95fd82210..ed7b298e1 100644
3
3
+
--- a/windmill-worker/src/rust_executor.rs
4
4
+
+++ b/windmill-worker/src/rust_executor.rs
5
5
+
@@ -29,7 +29,7 @@ use crate::SYSTEM_ROOT;
6
6
+
const NSJAIL_CONFIG_RUN_RUST_CONTENT: &str = include_str!("../nsjail/run.rust.config.proto");
7
7
+
8
8
+
lazy_static::lazy_static! {
9
9
+
- static ref HOME_DIR: String = std::env::var("HOME").expect("Could not find the HOME environment variable");
10
10
+
+ static ref HOME_DIR: String = std::env::var("HOME").unwrap_or_else(|_| format!("{}/cargo", windmill_common::worker::ROOT_CACHE_DIR));
11
11
+
static ref CARGO_HOME: String = std::env::var("CARGO_HOME").unwrap_or_else(|_| { CARGO_HOME_DEFAULT.clone() });
12
12
+
static ref RUSTUP_HOME: String = std::env::var("RUSTUP_HOME").unwrap_or_else(|_| { RUSTUP_HOME_DEFAULT.clone() });
13
13
+
static ref CARGO_PATH: String = std::env::var("CARGO_PATH").unwrap_or_else(|_| format!("{}/bin/cargo", CARGO_HOME.as_str()));