gnu: Add cadabra.

* gnu/packages/engineering.scm (cadabra): New variable.

Change-Id: I3c95e041ab6ba72b9fb68d4ca088184e618f8615
This commit is contained in:
Danny Milosavljevic 2024-12-28 09:57:04 +01:00
parent 475a186a6f
commit 3d29b0a364
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -4847,6 +4847,53 @@ multiple co-processes in cadabra.")
(home-page "https://cadabra.science/") (home-page "https://cadabra.science/")
(license license:gpl2+))) (license license:gpl2+)))
(define-public cadabra
(package
(name "cadabra")
(version "1.46")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/kpeeters/cadabra.git")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0kks3qv1rka9ynw386kspjwq0g7xmwjycwlr3bbmxjmnk9zvnn9h"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-gui")
#:make-flags
(list (string-append "TIMESTAMP=-DRELEASE=\"\\\""
,version
"\\\"\" -DDATETIME=\"\\\""
"Thu Jan 1 01:02:00 AM CET 1970"
"\\\"\" -DHOSTNAME=\"\\\""
"dummy"
"\\\"\""))
#:test-target "test"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix
(lambda _
(substitute* "tests/Makefile.in"
(("TIMER=/usr/bin/time ")
"TIMER=time "))
;; Upstream bug. spino is a pointer.
(substitute* "src/exchange.cc"
(("ngr.spino==false")
"!ngr.spino")))))))
(native-inputs
(list pkg-config time))
(inputs
(list lie pcre gmp libsigc++-2 modglue))
(synopsis "Computer algebra system geared towards field theory")
(description "This package provides a computer algebra system geared
towards field theory. This package is mostly meant to be used by texmacs
and mogan.")
(home-page "https://cadabra.science/")
(license license:gpl3+)))
(define-public cadabra2 (define-public cadabra2
(package (package
(name "cadabra2") (name "cadabra2")