@@ -151,6 +151,7 @@ writeTextFile rec {
151151
152152 # needed for cython
153153 export CC='${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc'
154+ export CXX='${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++'
154155 # cython needs to find these libraries, otherwise will fail with `ld: cannot find -lflint` or similar
155156 export LDFLAGS='${
156157 lib.concatStringsSep " " (map (pkg: "-L${pkg}/lib") [
@@ -178,6 +179,7 @@ writeTextFile rec {
178179 mpfr.dev
179180 ])
180181 }'
182+ export CXXFLAGS=$CFLAGS
181183
182184 export SAGE_LIB='${sagelib}/${python3.sitePackages}'
183185