From 240ca368e53007b0b1ddd6964a85f2e338b9d34d Mon Sep 17 00:00:00 2001 From: George Huebner Date: Sun, 21 Jul 2024 02:31:56 -0500 Subject: [PATCH] singular: fix docbuilding on non-sandboxed builds This upgrade fixes the issue with drawTropicalCurve docbuilding on Darwin (although said doctest is pretty useless now that Apple has removed postscript from macOS). Removed enableGfanlib; you can still overrideAttrs Added mpfr to be more consistent with upstream packaging recommendations --- .../science/math/singular/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix index ee84ae440b30..6ec1c9a2b74e 100644 --- a/pkgs/applications/science/math/singular/default.nix +++ b/pkgs/applications/science/math/singular/default.nix @@ -7,6 +7,7 @@ , getconf , flint3 , ntl +, mpfr , cddlib , gfan , lrcalc @@ -15,8 +16,7 @@ , latex2html , texinfo , texliveSmall -, enableDocs ? !stdenv.isDarwin -, enableGfanlib ? true +, enableDocs ? true }: stdenv.mkDerivation rec { @@ -40,12 +40,11 @@ stdenv.mkDerivation rec { }; configureFlags = [ + "--enable-gfanlib" "--with-ntl=${ntl}" - "--disable-pyobject-module" + "--with-flint=${flint3}" ] ++ lib.optionals enableDocs [ "--enable-doc-build" - ] ++ lib.optionals enableGfanlib [ - "--enable-gfanlib" ]; prePatch = '' @@ -61,14 +60,15 @@ stdenv.mkDerivation rec { buildInputs = [ # necessary gmp + flint3 # by upstream recommended but optional ncurses readline ntl - flint3 + mpfr lrcalc + # for gfanlib gfan - ] ++ lib.optionals enableGfanlib [ cddlib ]; @@ -100,6 +100,8 @@ stdenv.mkDerivation rec { doCheck = true; # very basic checks, does not test any libraries installPhase = '' + # clean up any artefacts a previous non-sandboxed docbuild may have left behind + rm /tmp/conic.log /tmp/conic.tex /tmp/tropicalcurve*.tex || true make install '' + lib.optionalString enableDocs '' # Sage uses singular.info, which is not installed by default @@ -118,8 +120,8 @@ stdenv.mkDerivation rec { "Buch/buch.lst" "Plural/short.lst" "Old/factor.tst" - ] ++ lib.optionals enableGfanlib [ # tests that require gfanlib + # requires "DivRemIdU", a syzextra (undocumented) command "Short/ok_s.lst" ];