tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
project-lemonlime: add missing patch for non FHS env
wxt
1 year ago
6d34890b
277211f7
+57
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
pr
project-lemonlime
0001-Bind-Nix-Store.patch
package.nix
+41
pkgs/by-name/pr/project-lemonlime/0001-Bind-Nix-Store.patch
···
1
1
+
From f404e176e89c5d778363cb0177b44dc1aa5e1fda Mon Sep 17 00:00:00 2001
2
2
+
From: wxt <3264117476@qq.com>
3
3
+
Date: Tue, 5 Nov 2024 12:53:04 +0800
4
4
+
Subject: [PATCH] Bind Nix Store
5
5
+
6
6
+
---
7
7
+
src/core/judgingthread.cpp | 18 +++---------------
8
8
+
1 file changed, 3 insertions(+), 15 deletions(-)
9
9
+
10
10
+
diff --git a/src/core/judgingthread.cpp b/src/core/judgingthread.cpp
11
11
+
index 7201552..88aee9d 100644
12
12
+
--- a/src/core/judgingthread.cpp
13
13
+
+++ b/src/core/judgingthread.cpp
14
14
+
@@ -893,21 +893,9 @@ void JudgingThread::runProgram() {
15
15
+
auto *runner = new QProcess(this);
16
16
+
QStringList argumentsList;
17
17
+
18
18
+
- argumentsList << "--ro-bind"
19
19
+
- << "/usr"
20
20
+
- << "/usr";
21
21
+
- argumentsList << "--symlink"
22
22
+
- << "/usr/lib"
23
23
+
- << "/lib";
24
24
+
- argumentsList << "--symlink"
25
25
+
- << "/usr/lib64"
26
26
+
- << "/lib64";
27
27
+
- argumentsList << "--symlink"
28
28
+
- << "/usr/bin"
29
29
+
- << "/bin";
30
30
+
- argumentsList << "--symlink"
31
31
+
- << "/usr/sbin"
32
32
+
- << "/sbin";
33
33
+
+ argumentsList << "--bind"
34
34
+
+ << "/nix/store"
35
35
+
+ << "/nix/store";
36
36
+
argumentsList << "--tmpfs"
37
37
+
<< "/tmp";
38
38
+
39
39
+
--
40
40
+
2.46.1
41
41
+
+16
pkgs/by-name/pr/project-lemonlime/package.nix
···
5
5
cmake,
6
6
qt6,
7
7
nix-update-script,
8
8
+
bubblewrap,
9
9
+
bash,
10
10
+
diffutils,
8
11
}:
9
12
10
13
stdenv.mkDerivation (finalAttrs: {
···
23
26
cmake
24
27
qt6.wrapQtAppsHook
25
28
];
29
29
+
30
30
+
patches = [
31
31
+
./0001-Bind-Nix-Store.patch
32
32
+
];
33
33
+
34
34
+
postPatch = ''
35
35
+
substituteInPlace src/core/judgingthread.cpp \
36
36
+
--replace-fail "/usr/bin/bwrap" "${lib.getExe bubblewrap}"
37
37
+
substituteInPlace unix/watcher_unix.cpp \
38
38
+
--replace-fail "bash" "${lib.getExe bash}"
39
39
+
substituteInPlace src/base/settings.cpp \
40
40
+
--replace-fail "/usr/bin/diff" "${diffutils}/bin/diff"
41
41
+
'';
26
42
27
43
cmakeFlags = [
28
44
(lib.cmakeBool "LEMON_QT6" true)