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