2017-11-07 23:21:01 +01:00
|
|
|
{ stdenv, fetchurl, libtool }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libtommath";
|
2019-11-06 10:46:15 +01:00
|
|
|
version = "1.2.0";
|
2008-08-12 21:57:35 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-11-07 23:21:01 +01:00
|
|
|
url = "https://github.com/libtom/libtommath/releases/download/v${version}/ltm-${version}.tar.xz";
|
2019-11-06 10:46:15 +01:00
|
|
|
sha256 = "1c8q1qy88cjhdjlk3g24mra94h34c1ldvkjz0n2988c0yvn5xixp";
|
2008-08-12 21:57:35 +02:00
|
|
|
};
|
|
|
|
|
2017-11-07 23:21:01 +01:00
|
|
|
nativeBuildInputs = [ libtool ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-06-06 04:54:38 +02:00
|
|
|
substituteInPlace makefile.shared --replace glibtool libtool
|
2017-11-07 23:21:01 +01:00
|
|
|
substituteInPlace makefile_include.mk --replace "shell arch" "shell uname -m"
|
|
|
|
'';
|
2008-08-12 21:57:35 +02:00
|
|
|
|
|
|
|
preBuild = ''
|
2017-11-07 23:21:01 +01:00
|
|
|
makeFlagsArray=(PREFIX=$out \
|
2008-08-12 21:57:35 +02:00
|
|
|
INSTALL_GROUP=$(id -g) \
|
|
|
|
INSTALL_USER=$(id -u))
|
|
|
|
'';
|
|
|
|
|
|
|
|
makefile = "makefile.shared";
|
|
|
|
|
2017-11-07 23:21:01 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.libtom.net/LibTomMath/";
|
2008-08-12 21:57:35 +02:00
|
|
|
description = "A library for integer-based number-theoretic applications";
|
2017-11-07 23:21:01 +01:00
|
|
|
license = with licenses; [ publicDomain wtfpl ];
|
|
|
|
platforms = platforms.unix;
|
2008-08-12 21:57:35 +02:00
|
|
|
};
|
|
|
|
}
|