From 5acf8ae51bff2ea0ce368434528a1f95b0f6eeab Mon Sep 17 00:00:00 2001 From: Katalin Rebhan Date: Sun, 21 Sep 2025 22:31:17 +0200 Subject: [PATCH 1/2] open5gs: use usrsctp on non-Linux This is the library Open5GS suggests to use for building on macOS. Since it's portable, use everywhere that isn't Linux. --- pkgs/by-name/op/open5gs/package.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/op/open5gs/package.nix b/pkgs/by-name/op/open5gs/package.nix index 5cd935064901..3b11a43d651c 100644 --- a/pkgs/by-name/op/open5gs/package.nix +++ b/pkgs/by-name/op/open5gs/package.nix @@ -21,6 +21,7 @@ curl, libtins, mongosh, + usrsctp, }: stdenv.mkDerivation (finalAttrs: { @@ -75,13 +76,18 @@ stdenv.mkDerivation (finalAttrs: { libyaml libmicrohttpd libgcrypt - lksctp-tools libidn openssl curl libtins gnutls libnghttp2.dev + ] + ++ lib.optionals stdenv.isLinux [ + lksctp-tools + ] + ++ lib.optionals (!stdenv.isLinux) [ + usrsctp ]; # For subproject From 6f420216e550e4b09f59642ae374763fd51027f9 Mon Sep 17 00:00:00 2001 From: Katalin Rebhan Date: Sun, 21 Sep 2025 22:31:17 +0200 Subject: [PATCH 2/2] open5gs: remove extra compiler flags Seems to be no longer needed with GCC and additionally breaks the build with Clang. --- pkgs/by-name/op/open5gs/package.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/by-name/op/open5gs/package.nix b/pkgs/by-name/op/open5gs/package.nix index 3b11a43d651c..d4e30914a6f8 100644 --- a/pkgs/by-name/op/open5gs/package.nix +++ b/pkgs/by-name/op/open5gs/package.nix @@ -90,14 +90,6 @@ stdenv.mkDerivation (finalAttrs: { usrsctp ]; - # For subproject - env = { - NIX_CFLAGS_COMPILE = toString [ - "-Wno-error=array-bounds" - "-Wno-error=stringop-overflow" - ]; - }; - preConfigure = '' cp -R --no-preserve=mode,ownership ${finalAttrs.diameter} subprojects/freeDiameter cp -R --no-preserve=mode,ownership ${finalAttrs.libtins} subprojects/libtins