Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkgs/by-name/sa/sage/sage-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions pkgs/by-name/sa/sage/sagelib.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
lib,
stdenv,
sage-src,
env-locations,
python,
Expand Down Expand Up @@ -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
Expand Down
Loading