diff --git a/pkgs/by-name/gf/gfan/package.nix b/pkgs/by-name/gf/gfan/package.nix index 9c1d1864dc48..9ca8ed038811 100644 --- a/pkgs/by-name/gf/gfan/package.nix +++ b/pkgs/by-name/gf/gfan/package.nix @@ -35,7 +35,14 @@ stdenv.mkDerivation (finalAttrs: { }) ]; - postPatch = lib.optionalString stdenv.cc.isClang '' + # This test assumes that our implementation of sort behaves identically to the + # one used during development, which is not necessarily the case; update the + # expected result to be sorted using our copy of sort. + postPatch = '' + sort testsuite/0008PolynomialSetUnion/output -o testsuite/0008PolynomialSetUnion/output + sort testsuite/0008PolynomialSetUnion/outputNew -o testsuite/0008PolynomialSetUnion/outputNew + '' + + lib.optionalString stdenv.cc.isClang '' substituteInPlace Makefile --replace "-fno-guess-branch-probability" "" for f in $(find -name "*.h" -or -name "*.cpp"); do @@ -53,6 +60,15 @@ stdenv.mkDerivation (finalAttrs: { mpir cddlib ]; + hardeningDisable = [ "libcxxhardeningfast" ]; + + doCheck = true; + # The test runner still exits successfully when there are failed tests, so check + # stdout to see if anything failed. + checkPhase = '' + make check | tee "$TMPDIR/test.log" + ! grep -q "Failed tests:" "$TMPDIR/test.log" + ''; meta = { description = "Software package for computing Gröbner fans and tropical varieties";