From 4d3b1bcad8797b28a4cf744fdad043b4f438ba32 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Thu, 2 Jan 2025 02:12:46 -0800 Subject: [PATCH] singular: fix clang-19 build remove dead code with invalid member reference https://github.com/Singular/Singular/commit/d3f73432d73ac0dd041af83cb35301498e9b57d9 enable local networking in darwin sandbox note: the darwin build is still broken due a link error which occurs due to combining -flat_namespace and libgfortran.dylib -- gfortran/libs are usings `@rpaths/libname.dylib` rather than full path names. However, once this is fix the build succeeds. --- pkgs/by-name/si/singular/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/si/singular/package.nix b/pkgs/by-name/si/singular/package.nix index 47e6c2445191..40fa34b87761 100644 --- a/pkgs/by-name/si/singular/package.nix +++ b/pkgs/by-name/si/singular/package.nix @@ -1,6 +1,7 @@ { stdenv, fetchFromGitHub, + fetchpatch, gmp, bison, perl, @@ -48,6 +49,15 @@ stdenv.mkDerivation rec { forceFetchGit = true; }; + patches = [ + (fetchpatch { + # removes dead code with invalid member reference in gfanlib + name = "clang-19.patch"; + url = "https://github.com/Singular/Singular/commit/d3f73432d73ac0dd041af83cb35301498e9b57d9.patch"; + hash = "sha256-1KOk+yrTvHWY4aSK9QcByHIwKwe71QIYTMx8zo7XNos="; + }) + ]; + configureFlags = [ "--enable-gfanlib" @@ -173,6 +183,7 @@ stdenv.mkDerivation rec { ''; enableParallelBuilding = true; + __darwinAllowLocalNetworking = true; meta = with lib; { description = "CAS for polynomial computations";