1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
6 outputs = [ "out" "cxx" "doc" "dev" ];
9 url = "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${version}.tar.gz";
10 hash = "sha256-n5zUwEH5m1xJ/7e1nZ8S2VtoPYhYVgiqVqYwdmeysh8=";
13 configureFlags = [ "LD=${stdenv.cc.targetPrefix}cc" ];
17 mv $out/lib/*c++* $cxx/lib
19 mkdir -p $dev/nix-support
20 echo -n $cxx >> $dev/nix-support/propagated-build-inputs
24 description = "Library for arbitrary precision decimal floating point arithmetic";
27 libmpdec is a fast C/C++ library for correctly-rounded arbitrary
28 precision decimal floating point arithmetic. It is a complete
29 implementation of Mike Cowlishaw/IBM's General Decimal Arithmetic
30 Specification. The full specification is available here:
32 http://speleotrove.com/decimal/
34 libmpdec will - with minor restrictions - also conform to the IEEE
35 754-2008 Standard for Floating-Point Arithmetic, provided that the
36 appropriate context parameters are set.
38 libmpdec++ is a complete implementation of the General Decimal Arithmetic
39 Specification. libmpdec++ is mostly a header library around libmpdec's C
43 homepage = "https://www.bytereef.org/mpdecimal/index.html";
45 downloadPage = "https://www.bytereef.org/mpdecimal/download.html";
47 changelog = "https://www.bytereef.org/mpdecimal/changelog.html";
49 license = lib.licenses.bsd2;
51 maintainers = with lib.maintainers; [ kaction ];
53 platforms = lib.platforms.unix;