From 8baf105cbd35e538d8133a857d4b4fede89f902c Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 22 Jan 2024 17:51:44 +0900 Subject: [PATCH] fix: skip glibc requirements check on nixos (#202982) --- resources/server/bin/helpers/check-requirements-linux.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh index ac1840d61d8a5..af77f0b9d8252 100644 --- a/resources/server/bin/helpers/check-requirements-linux.sh +++ b/resources/server/bin/helpers/check-requirements-linux.sh @@ -10,6 +10,13 @@ ARCH=$(uname -m) found_required_glibc=0 found_required_glibcxx=0 +# Extract the ID value from /etc/os-release +OS_ID="$(cat /etc/os-release | grep -Eo 'ID=([^"]+)' | sed 's/ID=//')" +if [ "$OS_ID" = "nixos" ]; then + echo "Warning: NixOS detected, skipping GLIBC check" + exit 0 +fi + # Based on https://github.com/bminor/glibc/blob/520b1df08de68a3de328b65a25b86300a7ddf512/elf/cache.c#L162-L245 case $ARCH in x86_64) LDCONFIG_ARCH="x86-64";;