mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-01 13:14:42 +00:00
78 lines
1.3 KiB
Nix
78 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPlatform,
|
|
hostPlatform,
|
|
fetchurl,
|
|
bash,
|
|
coreutils,
|
|
gcc,
|
|
binutils,
|
|
gnumake,
|
|
gnused,
|
|
gnugrep,
|
|
gawk,
|
|
diffutils,
|
|
findutils,
|
|
gnutar,
|
|
gzip,
|
|
bzip2,
|
|
xz,
|
|
libgmp,
|
|
libmpfr,
|
|
}:
|
|
let
|
|
pname = "mpc";
|
|
version = "1.3.1";
|
|
src = fetchurl {
|
|
url = "mirror://gnu/mpc/mpc-${version}.tar.gz";
|
|
hash = "sha256-q2QkkvXPiCt0qgy3MM1BCoHtzb7IlRg86TDnBsHHWbg=";
|
|
};
|
|
in
|
|
bash.runCommand "${pname}-${version}"
|
|
{
|
|
inherit pname version;
|
|
|
|
nativeBuildInputs = [
|
|
gcc
|
|
binutils
|
|
gnumake
|
|
gnused
|
|
gnugrep
|
|
gawk
|
|
diffutils
|
|
findutils
|
|
gnutar
|
|
gzip
|
|
bzip2
|
|
xz
|
|
];
|
|
|
|
meta = {
|
|
description = "GNU Multiple Precision Complex Library, version ${version}";
|
|
homepage = "https://www.multiprecision.org/";
|
|
license = lib.licenses.lgpl3Plus;
|
|
teams = [ lib.teams.minimal-bootstrap ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|
|
''
|
|
# Unpack
|
|
tar xf ${src}
|
|
cd mpc-${version}
|
|
|
|
# Configure
|
|
bash ./configure \
|
|
--prefix=$out \
|
|
--build=${buildPlatform.config} \
|
|
--host=${hostPlatform.config} \
|
|
--disable-dependency-tracking \
|
|
--with-gmp=${libgmp} \
|
|
--with-mpfr=${libmpfr}
|
|
|
|
# Build
|
|
make -j $NIX_BUILD_CORES
|
|
|
|
# Install
|
|
make -j $NIX_BUILD_CORES install-strip
|
|
''
|