3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libtommath/default.nix

36 lines
941 B
Nix
Raw Normal View History

2017-11-07 22:21:01 +00:00
{ stdenv, fetchurl, libtool }:
stdenv.mkDerivation rec {
pname = "libtommath";
version = "1.1.0";
src = fetchurl {
2017-11-07 22:21:01 +00:00
url = "https://github.com/libtom/libtommath/releases/download/v${version}/ltm-${version}.tar.xz";
sha256 = "1bbyagqzfdbg37k1n08nsqzdf44z8zsnjjinqbsyj7rxg246qilh";
};
2017-11-07 22:21:01 +00:00
nativeBuildInputs = [ libtool ];
postPatch = ''
substituteInPlace makefile.shared --replace glibtool libtool
2017-11-07 22:21:01 +00:00
substituteInPlace makefile_include.mk --replace "shell arch" "shell uname -m"
'';
preBuild = ''
2017-11-07 22:21:01 +00:00
makeFlagsArray=(PREFIX=$out \
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/;
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;
};
}