From 60ad423963e839838c72cd7a299eed0bf1ca00ff Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Wed, 16 Nov 2022 20:04:12 -0500 Subject: [PATCH] mpdecimal: init at 2.5.1 --- .../libraries/mpdecimal/default.nix | 47 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/libraries/mpdecimal/default.nix diff --git a/pkgs/development/libraries/mpdecimal/default.nix b/pkgs/development/libraries/mpdecimal/default.nix new file mode 100644 index 000000000000..5fa03b7083e2 --- /dev/null +++ b/pkgs/development/libraries/mpdecimal/default.nix @@ -0,0 +1,47 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "mpdecimal"; + version = "2.5.1"; + outputs = [ "out" "doc" ]; + + src = fetchurl { + url = "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${version}.tar.gz"; + hash = "sha256-n5zUwEH5m1xJ/7e1nZ8S2VtoPYhYVgiqVqYwdmeysh8="; + }; + + configureFlags = [ "LD=${stdenv.cc.targetPrefix}cc" ]; + + meta = { + description = "Library for arbitrary precision decimal floating point arithmetic"; + + longDescription = '' + libmpdec is a fast C/C++ library for correctly-rounded arbitrary + precision decimal floating point arithmetic. It is a complete + implementation of Mike Cowlishaw/IBM's General Decimal Arithmetic + Specification. The full specification is available here: + + http://speleotrove.com/decimal/ + + libmpdec will - with minor restrictions - also conform to the IEEE + 754-2008 Standard for Floating-Point Arithmetic, provided that the + appropriate context parameters are set. + + libmpdec++ is a complete implementation of the General Decimal Arithmetic + Specification. libmpdec++ is mostly a header library around libmpdec's C + functions. + ''; + + homepage = "https://www.bytereef.org/mpdecimal/index.html"; + + downloadPage = "https://www.bytereef.org/mpdecimal/download.html"; + + changelog = "https://www.bytereef.org/mpdecimal/changelog.html"; + + license = lib.licenses.bsd2; + + maintainers = with lib.maintainers; [ kaction ]; + + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ba9454d502f5..2c3a4c51cfc4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19622,6 +19622,8 @@ with pkgs; mpfi = callPackage ../development/libraries/mpfi { }; + mpdecimal = callPackage ../development/libraries/mpdecimal { }; + mpfshell = callPackage ../development/tools/mpfshell { }; # A GMP fork