mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
minimal-bootstrap.libmpfr: init at 4.2.2
This commit is contained in:
@@ -281,6 +281,12 @@ lib.makeScope
|
||||
gnutar = gnutar-latest;
|
||||
};
|
||||
|
||||
libmpfr = callPackage ./gcc/mpfr.nix {
|
||||
gcc = gcc-latest;
|
||||
gnumake = gnumake-musl;
|
||||
gnutar = gnutar-latest;
|
||||
};
|
||||
|
||||
linux-headers = callPackage ./linux-headers {
|
||||
gcc = gcc-latest;
|
||||
gnumake = gnumake-musl;
|
||||
|
||||
71
pkgs/os-specific/linux/minimal-bootstrap/gcc/mpfr.nix
Normal file
71
pkgs/os-specific/linux/minimal-bootstrap/gcc/mpfr.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
lib,
|
||||
buildPlatform,
|
||||
hostPlatform,
|
||||
fetchurl,
|
||||
bash,
|
||||
gcc,
|
||||
binutils,
|
||||
gnumake,
|
||||
gnused,
|
||||
gnugrep,
|
||||
gawk,
|
||||
diffutils,
|
||||
findutils,
|
||||
gnutar,
|
||||
xz,
|
||||
libgmp,
|
||||
}:
|
||||
let
|
||||
pname = "mpfr";
|
||||
version = "4.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/mpfr/mpfr-${version}.tar.xz";
|
||||
hash = "sha256-tnugOD736KhWNzTi6InvXsPDuJigHQD6CmhprYHGzgE=";
|
||||
};
|
||||
in
|
||||
bash.runCommand "${pname}-${version}"
|
||||
{
|
||||
inherit pname version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gcc
|
||||
binutils
|
||||
gnumake
|
||||
gnused
|
||||
gnugrep
|
||||
gawk
|
||||
diffutils
|
||||
findutils
|
||||
gnutar
|
||||
xz
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "The GNU Multiple Precision Floating-Point Reliable Library, version ${version}";
|
||||
homepage = "https://www.mpfr.org/";
|
||||
license = lib.licenses.lgpl3Plus;
|
||||
teams = [ lib.teams.minimal-bootstrap ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
''
|
||||
# Unpack
|
||||
tar xf ${src}
|
||||
cd mpfr-${version}
|
||||
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${buildPlatform.config} \
|
||||
--host=${hostPlatform.config} \
|
||||
--disable-dependency-tracking \
|
||||
--with-gmp=${libgmp}
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install-strip
|
||||
''
|
||||
Reference in New Issue
Block a user