Ginac fixed on aarch64-darwin by compiling with gcc (#514395)

This commit is contained in:
Sandro
2026-05-19 01:12:27 +00:00
committed by GitHub
2 changed files with 41 additions and 1 deletions
@@ -0,0 +1,36 @@
{
runCommand,
gccStdenv,
cln,
ginac,
}:
runCommand "ginac-example-test"
{
nativeBuildInputs = [
gccStdenv.cc
ginac
cln
];
}
''
echo "
#include <iostream>
#include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;
int main() {
symbol x(\"x\"), y(\"y\");
ex poly;
for (int i=0; i<3; ++i) {
poly += factorial(i+16)*pow(x,i)*pow(y,2-i);
}
cout << poly << endl;
return 0;
}" > hello.cc
c++ -lginac -lcln hello.cc -o hello
./hello
mkdir $out
''
+5 -1
View File
@@ -1,6 +1,8 @@
{
lib,
stdenv,
gccStdenv,
callPackage,
fetchurl,
cln,
pkg-config,
@@ -9,7 +11,7 @@
python3,
}:
stdenv.mkDerivation (finalAttrs: {
gccStdenv.mkDerivation (finalAttrs: {
pname = "ginac";
version = "1.8.10";
@@ -35,6 +37,8 @@ stdenv.mkDerivation (finalAttrs: {
configureFlags = [ "--disable-rpath" ];
passthru.tests.example = callPackage ./ginac-example-test.nix { ginac = finalAttrs.finalPackage; };
meta = {
description = "GiNaC C++ library for symbolic manipulations";
homepage = "https://www.ginac.de/";