{ lib, buildPlatform, hostPlatform, fetchurl, bash, coreutils, gcc-buildbuild, gcc, binutils, gnumake, gnused, gnugrep, gawk, diffutils, findutils, gnutar, gzip, bzip2, xz, }: let pname = "gmp"; version = "6.3.0"; src = fetchurl { url = "mirror://gnu/gmp/gmp-${version}.tar.xz"; hash = "sha256-o8K4AgG4nmhhb0rTC8Zq7kknw85Q4zkpyoGdXENTiJg="; }; in bash.runCommand "${pname}-${version}" { inherit pname version; nativeBuildInputs = [ gcc gcc-buildbuild binutils gnumake gnused gnugrep gawk diffutils findutils gnutar gzip bzip2 xz ]; meta = { description = "The GNU Multiple Precision Arithmetic Library, version ${version}"; homepage = "https://gmplib.org/"; license = with lib.licenses; [ lgpl3Only gpl2Only ]; teams = [ lib.teams.minimal-bootstrap ]; platforms = lib.platforms.unix; }; } '' # Unpack tar xf ${src} cd gmp-${version} # Configure bash ./configure \ --prefix=$out \ --build=${buildPlatform.config} \ --host=${hostPlatform.config} \ --disable-dependency-tracking \ --with-pic \ --disable-assembly \ CFLAGS=-std=c99 \ M4=false # Build make -j $NIX_BUILD_CORES # Install make -j $NIX_BUILD_CORES install-strip ''