2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, guile, autoconf, flex, fetchpatch }:
|
2016-03-17 21:46:30 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.1.11";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libmatheval";
|
2016-03-17 21:46:30 +01:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config autoconf flex ];
|
2016-03-17 21:46:30 +01:00
|
|
|
buildInputs = [ guile ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://ftp.gnu.org/gnu/libmatheval/${pname}-${version}.tar.gz";
|
2016-03-17 21:46:30 +01:00
|
|
|
sha256 = "474852d6715ddc3b6969e28de5e1a5fbaff9e8ece6aebb9dc1cc63e9e88e89ab";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Patches coming from debian package
|
|
|
|
# https://packages.debian.org/source/sid/libs/libmatheval
|
|
|
|
patches = [ (fetchpatch {
|
2018-11-25 00:12:55 +01:00
|
|
|
url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/002-skip-docs.patch";
|
2016-03-17 21:46:30 +01:00
|
|
|
sha256 = "1nnkk9aw4jj6nql46zhwq6vx74zrmr1xq5ix0xyvpawhabhgjg62";
|
|
|
|
} )
|
|
|
|
(fetchpatch {
|
2018-11-25 00:12:55 +01:00
|
|
|
url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/003-guile2.0.patch";
|
2016-03-17 21:46:30 +01:00
|
|
|
sha256 = "1xgfw4finfvr20kjbpr4yl2djxmyr4lmvfa11pxirfvhrdi602qj";
|
|
|
|
} )
|
|
|
|
(fetchpatch {
|
2018-11-25 00:12:55 +01:00
|
|
|
url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/disable_coth_test.patch";
|
2016-03-17 21:46:30 +01:00
|
|
|
sha256 = "0bai8jrd5azfz5afmjixlvifk34liq58qb7p9kb45k6kc1fqqxzm";
|
|
|
|
} )
|
|
|
|
];
|
2018-11-25 00:12:55 +01:00
|
|
|
|
2016-03-17 21:46:30 +01:00
|
|
|
meta = {
|
|
|
|
description = "A library to parse and evaluate symbolic expressions input as text";
|
|
|
|
longDescription = ''
|
2018-11-25 00:12:55 +01:00
|
|
|
GNU libmatheval is a library (callable from C and Fortran) to parse and evaluate symbolic
|
|
|
|
expressions input as text. It supports expressions in any number of variables of arbitrary
|
|
|
|
names, decimal and symbolic constants, basic unary and binary operators, and elementary
|
|
|
|
mathematical functions. In addition to parsing and evaluation, libmatheval can also compute
|
2016-03-17 21:46:30 +01:00
|
|
|
symbolic derivatives and output expressions to strings.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.gnu.org/software/libmatheval/";
|
2021-01-21 18:00:13 +01:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = [ lib.maintainers.bzizou ];
|
|
|
|
platforms = lib.platforms.linux;
|
2016-03-17 21:46:30 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|