gfan: fix to pass sage doctests on clang

This issue does not present at build time, but only in sage
doctests. See https://www.github.com/sagemath/sage/issues/25118
This commit is contained in:
George Huebner 2024-07-18 19:43:11 -05:00
parent dfd8a367d7
commit b9b4e09d6d
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, gmp, mpir, cddlib}:
{lib, stdenv, fetchpatch, fetchurl, gmp, mpir, cddlib}:
stdenv.mkDerivation rec {
pname = "gfan";
version = "0.6.2";
@ -10,6 +10,12 @@ stdenv.mkDerivation rec {
patches = [
./gfan-0.6.2-cddlib-prefix.patch
] ++ lib.optionals (stdenv.cc.isClang) [
(fetchpatch {
name = "clang-fix-miscompilation.patch";
url = "https://raw.githubusercontent.com/sagemath/sage/eea1f59394a5066e9acd8ae39a90302820914ee3/build/pkgs/gfan/patches/nodel.patch";
sha256 = "sha256-RrncSgFyrBIk/Bwe3accxiJ2rpOSJKQ84cV/uBvQsDc=";
})
];
postPatch = lib.optionalString stdenv.cc.isClang ''