Files
nixpkgs/pkgs/by-name/mk/mkosi/0002-Fix-library-resolving.patch
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

35 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Moritz Sanft <58110325+msanft@users.noreply.github.com>
Date: Tue, 3 Sep 2024 09:00:34 +0200
Subject: [PATCH] Fix library resolving
As ctypes doesn't do lookups in the Nix store for libraries, we supply the exact paths.
Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
---
mkosi/sandbox.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkosi/sandbox.py b/mkosi/sandbox.py
index c79b48739f3d7127375274bc0b1ef3463cae9032..1d7ad421f4534e25c6456c3a169ea9189668aefd 100755
--- a/mkosi/sandbox.py
+++ b/mkosi/sandbox.py
@@ -92,7 +92,7 @@ class cap_user_data_t(ctypes.Structure):
]
-libc = ctypes.CDLL(None, use_errno=True)
+libc = ctypes.CDLL("@LIBC@", use_errno=True)
libc.syscall.restype = ctypes.c_long
libc.unshare.argtypes = (ctypes.c_int,)
@@ -221,7 +221,7 @@ def seccomp_suppress(*, chown: bool = False, sync: bool = False) -> None:
if not chown and not sync:
return
- libseccomp = ctypes.CDLL("libseccomp.so.2")
+ libseccomp = ctypes.CDLL("@LIBSECCOMP@")
if libseccomp is None:
raise FileNotFoundError("libseccomp.so.2")