at 24.05-pre 55 lines 1.7 kB view raw
1{ lib, stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 pname = "mpdecimal"; 5 version = "2.5.1"; 6 outputs = [ "out" "cxx" "doc" "dev" ]; 7 8 src = fetchurl { 9 url = "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${version}.tar.gz"; 10 hash = "sha256-n5zUwEH5m1xJ/7e1nZ8S2VtoPYhYVgiqVqYwdmeysh8="; 11 }; 12 13 configureFlags = [ "LD=${stdenv.cc.targetPrefix}cc" ]; 14 15 postInstall = '' 16 mkdir -p $cxx/lib 17 mv $out/lib/*c++* $cxx/lib 18 19 mkdir -p $dev/nix-support 20 echo -n $cxx >> $dev/nix-support/propagated-build-inputs 21 ''; 22 23 meta = { 24 description = "Library for arbitrary precision decimal floating point arithmetic"; 25 26 longDescription = '' 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: 31 32 http://speleotrove.com/decimal/ 33 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. 37 38 libmpdec++ is a complete implementation of the General Decimal Arithmetic 39 Specification. libmpdec++ is mostly a header library around libmpdec's C 40 functions. 41 ''; 42 43 homepage = "https://www.bytereef.org/mpdecimal/index.html"; 44 45 downloadPage = "https://www.bytereef.org/mpdecimal/download.html"; 46 47 changelog = "https://www.bytereef.org/mpdecimal/changelog.html"; 48 49 license = lib.licenses.bsd2; 50 51 maintainers = with lib.maintainers; [ kaction ]; 52 53 platforms = lib.platforms.unix; 54 }; 55}