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