sage.lib, sage.test: clang-19 / darwin fixes (#370822)

This commit is contained in:
Mauricio Collares
2025-01-04 12:41:25 +01:00
committed by GitHub
2 changed files with 17 additions and 0 deletions
+8
View File
@@ -49,6 +49,14 @@ stdenv.mkDerivation {
makeWrapper "${sage-with-env}/bin/sage" "$out/bin/sage"
'';
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# prevent warnings about assigning LC_* to "C" resulting in broken tests
# when run in darwin sandbox
LC_ALL = "en_US.UTF-8";
};
# allow singular tests to pass in darwin sandbox
__darwinAllowLocalNetworking = true;
doInstallCheck = true;
installCheckPhase = ''
export HOME="$TMPDIR/sage-home"
+9
View File
@@ -1,4 +1,6 @@
{
lib,
stdenv,
sage-src,
env-locations,
python,
@@ -118,6 +120,13 @@ buildPythonPackage rec {
readline
];
env = lib.optionalAttrs stdenv.cc.isClang {
# code tries to assign a unsigned long to an int in an initialized list
# leading to this error.
# https://github.com/sagemath/sage/pull/39249
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing-const-reference";
};
propagatedBuildInputs = [
# native dependencies (TODO: determine which ones need to be propagated)
blas