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-02-05 08:33:51 +01:00
|
|
|
version = "1.1.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-02-05 08:33:51 +01:00
|
|
|
sha256 = "1bbyagqzfdbg37k1n08nsqzdf44z8zsnjjinqbsyj7rxg246qilh";
|
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; {
|
2018-06-23 13:34:55 +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
|
|
|
};
|
|
|
|
}
|