mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
51 lines
2.0 KiB
Nix
51 lines
2.0 KiB
Nix
{ lib, stdenv, fetchurl, pkg-config, guile, flex, fetchpatch }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.1.11";
|
|
pname = "libmatheval";
|
|
|
|
nativeBuildInputs = [ pkg-config flex ];
|
|
buildInputs = [ guile ];
|
|
|
|
src = fetchurl {
|
|
url = "https://ftp.gnu.org/gnu/libmatheval/${pname}-${version}.tar.gz";
|
|
sha256 = "474852d6715ddc3b6969e28de5e1a5fbaff9e8ece6aebb9dc1cc63e9e88e89ab";
|
|
};
|
|
|
|
# Patches coming from debian package
|
|
# https://packages.debian.org/source/sid/libs/libmatheval
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://sources.debian.org/data/main/libm/libmatheval/1.1.11%2Bdfsg-5/debian/patches/002-skip-docs.patch";
|
|
hash = "sha256-wjz54FKQq7t9Bz0W3EOu+ZPTt8EcfkMotkZKwlWa09o=";
|
|
})
|
|
(fetchpatch {
|
|
url = "https://sources.debian.org/data/main/libm/libmatheval/1.1.11%2Bdfsg-5/debian/patches/003-guile3.0.patch";
|
|
hash = "sha256-H3E/2m4MfQAbjpXbVFyNhikVifi3spVThzaVU5srmjI=";
|
|
})
|
|
(fetchpatch {
|
|
url = "https://sources.debian.org/data/main/libm/libmatheval/1.1.11%2Bdfsg-5/debian/patches/disable_coth_test.patch";
|
|
hash = "sha256-9XeMXWDTzELWTPcsjAqOlIzp4qY9yupU+e6r0rJEUS0=";
|
|
})
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev guile}/include/guile/${guile.effectiveVersion}";
|
|
env.NIX_LDFLAGS = "-L${guile}/lib -lguile-${guile.effectiveVersion}";
|
|
|
|
meta = {
|
|
description = "Library to parse and evaluate symbolic expressions input as text";
|
|
longDescription = ''
|
|
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
|
|
symbolic derivatives and output expressions to strings.
|
|
'';
|
|
homepage = "https://www.gnu.org/software/libmatheval/";
|
|
license = lib.licenses.gpl3;
|
|
maintainers = [ lib.maintainers.bzizou ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|
|
|