Merge branch 'staging' (older one)
Hydra seems OK-ish, except that some aarch64 jobs need restarting after qt4 timing out for the first time: https://hydra.nixos.org/eval/1412641?compare=1412561
This commit is contained in:
commit
7dfa97969a
@ -41,7 +41,6 @@ let
|
|||||||
generators = callLibs ./generators.nix;
|
generators = callLibs ./generators.nix;
|
||||||
misc = callLibs ./deprecated.nix;
|
misc = callLibs ./deprecated.nix;
|
||||||
# domain-specific
|
# domain-specific
|
||||||
sandbox = callLibs ./sandbox.nix;
|
|
||||||
fetchers = callLibs ./fetchers.nix;
|
fetchers = callLibs ./fetchers.nix;
|
||||||
|
|
||||||
# Eval-time filesystem handling
|
# Eval-time filesystem handling
|
||||||
|
@ -208,6 +208,7 @@
|
|||||||
eqyiel = "Ruben Maher <r@rkm.id.au>";
|
eqyiel = "Ruben Maher <r@rkm.id.au>";
|
||||||
ericbmerritt = "Eric Merritt <eric@afiniate.com>";
|
ericbmerritt = "Eric Merritt <eric@afiniate.com>";
|
||||||
ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>";
|
ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>";
|
||||||
|
ericson2314 = "John Ericson <John.Ericson@Obsidian.Systems>";
|
||||||
erictapen = "Justin Humm <justin.humm@posteo.de>";
|
erictapen = "Justin Humm <justin.humm@posteo.de>";
|
||||||
erikryb = "Erik Rybakken <erik.rybakken@math.ntnu.no>";
|
erikryb = "Erik Rybakken <erik.rybakken@math.ntnu.no>";
|
||||||
ertes = "Ertugrul Söylemez <esz@posteo.de>";
|
ertes = "Ertugrul Söylemez <esz@posteo.de>";
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
{ lib }:
|
|
||||||
with lib.strings;
|
|
||||||
|
|
||||||
/* Helpers for creating lisp S-exprs for the Apple sandbox
|
|
||||||
|
|
||||||
lib.sandbox.allowFileRead [ "/usr/bin/file" ];
|
|
||||||
# => "(allow file-read* (literal \"/usr/bin/file\"))";
|
|
||||||
|
|
||||||
lib.sandbox.allowFileRead {
|
|
||||||
literal = [ "/usr/bin/file" ];
|
|
||||||
subpath = [ "/usr/lib/system" ];
|
|
||||||
}
|
|
||||||
# => "(allow file-read* (literal \"/usr/bin/file\") (subpath \"/usr/lib/system\"))"
|
|
||||||
*/
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
sexp = tokens: "(" + builtins.concatStringsSep " " tokens + ")";
|
|
||||||
generateFileList = files:
|
|
||||||
if builtins.isList files
|
|
||||||
then concatMapStringsSep " " (x: sexp [ "literal" ''"${x}"'' ]) files
|
|
||||||
else if builtins.isString files
|
|
||||||
then generateFileList [ files ]
|
|
||||||
else concatStringsSep " " (
|
|
||||||
(map (x: sexp [ "literal" ''"${x}"'' ]) (files.literal or [])) ++
|
|
||||||
(map (x: sexp [ "subpath" ''"${x}"'' ]) (files.subpath or []))
|
|
||||||
);
|
|
||||||
applyToFiles = f: act: files: f "${act} ${generateFileList files}";
|
|
||||||
genActions = actionName: let
|
|
||||||
action = feature: sexp [ actionName feature ];
|
|
||||||
self = {
|
|
||||||
"${actionName}" = action;
|
|
||||||
"${actionName}File" = applyToFiles action "file*";
|
|
||||||
"${actionName}FileRead" = applyToFiles action "file-read*";
|
|
||||||
"${actionName}FileReadMetadata" = applyToFiles action "file-read-metadata";
|
|
||||||
"${actionName}DirectoryList" = self."${actionName}FileReadMetadata";
|
|
||||||
"${actionName}FileWrite" = applyToFiles action "file-write*";
|
|
||||||
"${actionName}FileWriteMetadata" = applyToFiles action "file-write-metadata";
|
|
||||||
};
|
|
||||||
in self;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
genActions "allow" // genActions "deny" // {
|
|
||||||
importProfile = derivation: ''
|
|
||||||
(import "${derivation}")
|
|
||||||
'';
|
|
||||||
}
|
|
@ -113,8 +113,7 @@ rec {
|
|||||||
--add-flags "''${vms[*]}" \
|
--add-flags "''${vms[*]}" \
|
||||||
${lib.optionalString enableOCR
|
${lib.optionalString enableOCR
|
||||||
"--prefix PATH : '${ocrProg}/bin:${imagemagick}/bin'"} \
|
"--prefix PATH : '${ocrProg}/bin:${imagemagick}/bin'"} \
|
||||||
--run "testScript=\"\$(cat $out/test-script)\"" \
|
--run "export testScript=\"\$(cat $out/test-script)\"" \
|
||||||
--set testScript '$testScript' \
|
|
||||||
--set VLANS '${toString vlans}'
|
--set VLANS '${toString vlans}'
|
||||||
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
||||||
wrapProgram $out/bin/nixos-run-vms \
|
wrapProgram $out/bin/nixos-run-vms \
|
||||||
|
@ -9,10 +9,17 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1ny7wv2wxm1av299wvpskall6438wjjpadphmqc7c0h6d0zg5kii";
|
sha256 = "1ny7wv2wxm1av299wvpskall6438wjjpadphmqc7c0h6d0zg5kii";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
# Build fails on Linux with windres.
|
||||||
|
export ac_cv_prog_ac_ct_WINDRES=
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = "--enable-dependency-tracking";
|
configureFlags = "--enable-dependency-tracking";
|
||||||
|
|
||||||
buildInputs = [ alsaLib python SDL ];
|
buildInputs = [ alsaLib python SDL ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Music tracker application, free reimplementation of Impulse Tracker";
|
description = "Music tracker application, free reimplementation of Impulse Tracker";
|
||||||
homepage = http://schismtracker.org/;
|
homepage = http://schismtracker.org/;
|
||||||
|
@ -14,6 +14,8 @@ let
|
|||||||
# src/common/command_utils.cpp
|
# src/common/command_utils.cpp
|
||||||
# https://github.com/NixOS/nixpkgs/issues/13783
|
# https://github.com/NixOS/nixpkgs/issues/13783
|
||||||
tarWithGzip = lib.overrideDerivation gnutar (oldAttrs: {
|
tarWithGzip = lib.overrideDerivation gnutar (oldAttrs: {
|
||||||
|
# Original builder is bash 4.3.42 from bootstrap tools, too old for makeWrapper.
|
||||||
|
builder = "${bash}/bin/bash";
|
||||||
buildInputs = (oldAttrs.buildInputs or []) ++ [ makeWrapper ];
|
buildInputs = (oldAttrs.buildInputs or []) ++ [ makeWrapper ];
|
||||||
postInstall = (oldAttrs.postInstall or "") + ''
|
postInstall = (oldAttrs.postInstall or "") + ''
|
||||||
wrapProgram $out/bin/tar --prefix PATH ":" "${gzip}/bin"
|
wrapProgram $out/bin/tar --prefix PATH ":" "${gzip}/bin"
|
||||||
|
@ -78,8 +78,8 @@ stdenv.mkDerivation {
|
|||||||
--replace /opt/HipChat4/bin/HipChat4 $out/bin/hipchat
|
--replace /opt/HipChat4/bin/HipChat4 $out/bin/hipchat
|
||||||
|
|
||||||
makeWrapper $d/HipChat.bin $out/bin/hipchat \
|
makeWrapper $d/HipChat.bin $out/bin/hipchat \
|
||||||
--set HIPCHAT_LD_LIBRARY_PATH '"$LD_LIBRARY_PATH"' \
|
--run 'export HIPCHAT_LD_LIBRARY_PATH=$LD_LIBRARY_PATH' \
|
||||||
--set HIPCHAT_QT_PLUGIN_PATH '"$QT_PLUGIN_PATH"' \
|
--run 'export HIPCHAT_QT_PLUGIN_PATH=$QT_PLUGIN_PATH' \
|
||||||
--set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \
|
--set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \
|
||||||
--set QTWEBENGINEPROCESS_PATH $d/QtWebEngineProcess
|
--set QTWEBENGINEPROCESS_PATH $d/QtWebEngineProcess
|
||||||
|
|
||||||
|
@ -12,7 +12,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake ];
|
nativeBuildInputs = [ autoconf automake ];
|
||||||
|
|
||||||
preConfigure = "./autogen.sh";
|
preConfigure = ''
|
||||||
|
./autogen.sh
|
||||||
|
|
||||||
|
# Build fails on Linux with windres.
|
||||||
|
export ac_cv_prog_WINDRES=
|
||||||
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://gravit.slowchop.com;
|
homepage = http://gravit.slowchop.com;
|
||||||
|
@ -32,6 +32,7 @@ stdenv.mkDerivation {
|
|||||||
./symlinks-in-bin.patch
|
./symlinks-in-bin.patch
|
||||||
./git-sh-i18n.patch
|
./git-sh-i18n.patch
|
||||||
./ssh-path.patch
|
./ssh-path.patch
|
||||||
|
./git-send-email-honor-PATH.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
From 9a4396ddaedaf59ebee16d69900884e990b79cdd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Florian Klink <flokli@flokli.de>
|
||||||
|
Date: Fri, 17 Nov 2017 13:21:37 +0100
|
||||||
|
Subject: [PATCH] git-send-email: honor $PATH
|
||||||
|
|
||||||
|
This will search $PATH for a sendmail binary, instead of the (previously
|
||||||
|
fixed) list of paths.
|
||||||
|
|
||||||
|
Signed-off-by: Florian Klink <flokli@flokli.de>
|
||||||
|
---
|
||||||
|
Documentation/git-send-email.txt | 5 ++---
|
||||||
|
git-send-email.perl | 3 ++-
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
|
||||||
|
index bac9014ac..b9b1f2c41 100644
|
||||||
|
--- a/Documentation/git-send-email.txt
|
||||||
|
+++ b/Documentation/git-send-email.txt
|
||||||
|
@@ -203,9 +203,8 @@ a password is obtained using 'git-credential'.
|
||||||
|
specify a full pathname of a sendmail-like program instead;
|
||||||
|
the program must support the `-i` option. Default value can
|
||||||
|
be specified by the `sendemail.smtpServer` configuration
|
||||||
|
- option; the built-in default is `/usr/sbin/sendmail` or
|
||||||
|
- `/usr/lib/sendmail` if such program is available, or
|
||||||
|
- `localhost` otherwise.
|
||||||
|
+ option; the built-in default is to search in $PATH if such program is
|
||||||
|
+ available, or `localhost` otherwise.
|
||||||
|
|
||||||
|
--smtp-server-port=<port>::
|
||||||
|
Specifies a port different from the default port (SMTP
|
||||||
|
diff --git a/git-send-email.perl b/git-send-email.perl
|
||||||
|
index 2208dcc21..8e357aeab 100755
|
||||||
|
--- a/git-send-email.perl
|
||||||
|
+++ b/git-send-email.perl
|
||||||
|
@@ -885,7 +885,8 @@ if (defined $initial_reply_to) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined $smtp_server) {
|
||||||
|
- foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
|
||||||
|
+ my @sendmail_paths = map {"$_/sendmail"} split /:/, $ENV{PATH};
|
||||||
|
+ foreach (@sendmail_paths) {
|
||||||
|
if (-x $_) {
|
||||||
|
$smtp_server = $_;
|
||||||
|
last;
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
@ -36,9 +36,9 @@ python27Packages.buildPythonApplication rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/qtile \
|
wrapProgram $out/bin/qtile \
|
||||||
--set QTILE_WRAPPER '$0' \
|
--run 'export QTILE_WRAPPER=$0' \
|
||||||
--set QTILE_SAVED_PYTHONPATH '$PYTHONPATH' \
|
--run 'export QTILE_SAVED_PYTHONPATH=$PYTHONPATH' \
|
||||||
--set QTILE_SAVED_PATH '$PATH'
|
--run 'export QTILE_SAVED_PATH=$PATH'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "weston-${version}";
|
name = "weston-${version}";
|
||||||
version = "1.12.0";
|
version = "3.0.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
|
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
|
||||||
sha256 = "ac7ac2a32e3b9f50131fccded5d2326bd36b2226712d90b61999118a09af5033";
|
sha256 = "19936zlkb75xcaidd8fag4ah8000wrh2ziqy7nxkq36pimgdbqfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -47,7 +47,12 @@ makeWrapper() {
|
|||||||
varName="${params[$((n + 1))]}"
|
varName="${params[$((n + 1))]}"
|
||||||
value="${params[$((n + 2))]}"
|
value="${params[$((n + 2))]}"
|
||||||
n=$((n + 2))
|
n=$((n + 2))
|
||||||
echo "export $varName=\"$value\"" >> "$wrapper"
|
echo "export $varName=${value@Q}" >> "$wrapper"
|
||||||
|
elif [[ "$p" == "--set-default" ]]; then
|
||||||
|
varName="${params[$((n + 1))]}"
|
||||||
|
value="${params[$((n + 2))]}"
|
||||||
|
n=$((n + 2))
|
||||||
|
echo "export $varName=\${$varName-${value@Q}}" >> "$wrapper"
|
||||||
elif [[ "$p" == "--unset" ]]; then
|
elif [[ "$p" == "--unset" ]]; then
|
||||||
varName="${params[$((n + 1))]}"
|
varName="${params[$((n + 1))]}"
|
||||||
n=$((n + 1))
|
n=$((n + 1))
|
||||||
@ -63,9 +68,9 @@ makeWrapper() {
|
|||||||
n=$((n + 3))
|
n=$((n + 3))
|
||||||
if test -n "$value"; then
|
if test -n "$value"; then
|
||||||
if test "$p" = "--suffix"; then
|
if test "$p" = "--suffix"; then
|
||||||
echo "export $varName=\$$varName\${$varName:+$separator}$value" >> "$wrapper"
|
echo "export $varName=\$$varName\${$varName:+${separator@Q}}${value@Q}" >> "$wrapper"
|
||||||
else
|
else
|
||||||
echo "export $varName=$value\${$varName:+$separator}\$$varName" >> "$wrapper"
|
echo "export $varName=${value@Q}\${$varName:+${separator@Q}}\$$varName" >> "$wrapper"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [[ "$p" == "--suffix-each" ]]; then
|
elif [[ "$p" == "--suffix-each" ]]; then
|
||||||
@ -74,7 +79,7 @@ makeWrapper() {
|
|||||||
values="${params[$((n + 3))]}"
|
values="${params[$((n + 3))]}"
|
||||||
n=$((n + 3))
|
n=$((n + 3))
|
||||||
for value in $values; do
|
for value in $values; do
|
||||||
echo "export $varName=\$$varName\${$varName:+$separator}$value" >> "$wrapper"
|
echo "export $varName=\$$varName\${$varName:+$separator}${value@Q}" >> "$wrapper"
|
||||||
done
|
done
|
||||||
elif [[ ("$p" == "--suffix-contents") || ("$p" == "--prefix-contents") ]]; then
|
elif [[ ("$p" == "--suffix-contents") || ("$p" == "--prefix-contents") ]]; then
|
||||||
varName="${params[$((n + 1))]}"
|
varName="${params[$((n + 1))]}"
|
||||||
@ -82,10 +87,11 @@ makeWrapper() {
|
|||||||
fileNames="${params[$((n + 3))]}"
|
fileNames="${params[$((n + 3))]}"
|
||||||
n=$((n + 3))
|
n=$((n + 3))
|
||||||
for fileName in $fileNames; do
|
for fileName in $fileNames; do
|
||||||
|
contents="$(cat "$fileName")"
|
||||||
if test "$p" = "--suffix-contents"; then
|
if test "$p" = "--suffix-contents"; then
|
||||||
echo "export $varName=\$$varName\${$varName:+$separator}$(cat "$fileName")" >> "$wrapper"
|
echo "export $varName=\$$varName\${$varName:+$separator}${contents@Q}" >> "$wrapper"
|
||||||
else
|
else
|
||||||
echo "export $varName=$(cat "$fileName")\${$varName:+$separator}\$$varName" >> "$wrapper"
|
echo "export $varName=${contents@Q}\${$varName:+$separator}\$$varName" >> "$wrapper"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
elif [[ "$p" == "--add-flags" ]]; then
|
elif [[ "$p" == "--add-flags" ]]; then
|
||||||
|
@ -37,7 +37,7 @@ stdenv.mkDerivation ({
|
|||||||
wrapProgram $f \
|
wrapProgram $f \
|
||||||
--set CHICKEN_REPOSITORY $CHICKEN_REPOSITORY \
|
--set CHICKEN_REPOSITORY $CHICKEN_REPOSITORY \
|
||||||
--prefix CHICKEN_REPOSITORY_EXTRA : "$out/lib/chicken/${toString chicken.binaryVersion}/:$CHICKEN_REPOSITORY_EXTRA" \
|
--prefix CHICKEN_REPOSITORY_EXTRA : "$out/lib/chicken/${toString chicken.binaryVersion}/:$CHICKEN_REPOSITORY_EXTRA" \
|
||||||
--prefix CHICKEN_INCLUDE_PATH \; \"$CHICKEN_INCLUDE_PATH\;$out/share/\" \
|
--prefix CHICKEN_INCLUDE_PATH \; "$CHICKEN_INCLUDE_PATH;$out/share/" \
|
||||||
--prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
|
--prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
wrapProgram $out/bin/dmd \
|
wrapProgram $out/bin/dmd \
|
||||||
--prefix PATH ":" "${stdenv.cc}/bin" \
|
--prefix PATH ":" "${stdenv.cc}/bin" \
|
||||||
--set CC "$""{CC:-$CC""}"
|
--set-default CC "$CC"
|
||||||
|
|
||||||
cd $out/bin
|
cd $out/bin
|
||||||
tee dmd.conf << EOF
|
tee dmd.conf << EOF
|
||||||
|
@ -152,7 +152,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
wrapProgram $out/bin/dmd \
|
wrapProgram $out/bin/dmd \
|
||||||
--prefix PATH ":" "${stdenv.cc}/bin" \
|
--prefix PATH ":" "${stdenv.cc}/bin" \
|
||||||
--set CC "$""{CC:-$CC""}"
|
--set-default CC "$CC"
|
||||||
|
|
||||||
cd $out/bin
|
cd $out/bin
|
||||||
tee dmd.conf << EOF
|
tee dmd.conf << EOF
|
||||||
|
@ -67,55 +67,54 @@ let version = "4.5.4";
|
|||||||
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform;
|
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform;
|
||||||
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatform;
|
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatform;
|
||||||
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null targetPlatform;
|
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null targetPlatform;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
|
||||||
crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt");
|
crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt");
|
||||||
|
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
withArch +
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
withCpu +
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
withAbi +
|
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
" --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
" --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then
|
(if crossMingw && crossStageStatic then [
|
||||||
" --with-headers=${libcCross}/include" +
|
"--with-headers=${libcCross}/include"
|
||||||
" --with-gcc" +
|
"--with-gcc"
|
||||||
" --with-gnu-as" +
|
"--with-gnu-as"
|
||||||
" --with-gnu-ld" +
|
"--with-gnu-ld"
|
||||||
" --with-gnu-ld" +
|
"--with-gnu-ld"
|
||||||
" --disable-shared" +
|
"--disable-shared"
|
||||||
" --disable-nls" +
|
"--disable-nls"
|
||||||
" --disable-debug" +
|
"--disable-debug"
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-sjlj-exceptions"
|
||||||
" --enable-threads=win32" +
|
"--enable-threads=win32"
|
||||||
" --disable-win32-registry"
|
"--disable-win32-registry"
|
||||||
else if crossStageStatic then
|
] else if crossStageStatic then [
|
||||||
" --disable-libssp --disable-nls" +
|
"--disable-libssp"
|
||||||
" --without-headers" +
|
"--disable-nls"
|
||||||
" --disable-threads " +
|
"--without-headers"
|
||||||
" --disable-libmudflap " +
|
"--disable-threads"
|
||||||
" --disable-libgomp " +
|
"--disable-libmudflap"
|
||||||
" --disable-shared" +
|
"--disable-libgomp"
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
"--disable-shared"
|
||||||
else
|
"--disable-decimal-float" # libdecnumber requires libc
|
||||||
" --with-headers=${libcCross}/include" +
|
] else [
|
||||||
" --enable-__cxa_atexit" +
|
"--with-headers=${libcCross}/include"
|
||||||
" --enable-long-long" +
|
"--enable-__cxa_atexit"
|
||||||
(if crossMingw then
|
"--enable-long-long"
|
||||||
" --enable-threads=win32" +
|
] ++
|
||||||
" --enable-sjlj-exceptions" +
|
(if crossMingw then [
|
||||||
" --enable-hash-synchronization" +
|
"--enable-threads=win32"
|
||||||
" --enable-version-specific-runtime-libs" +
|
"--enable-sjlj-exceptions"
|
||||||
" --disable-libssp" +
|
"--enable-hash-synchronization"
|
||||||
" --disable-nls" +
|
"--enable-version-specific-runtime-libs"
|
||||||
" --with-dwarf2"
|
"--disable-libssp"
|
||||||
else
|
"--disable-nls"
|
||||||
" --enable-threads=posix" +
|
"--with-dwarf2"
|
||||||
" --enable-nls" +
|
] else [
|
||||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
"--enable-threads=posix"
|
||||||
);
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
]));
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else
|
stageNameAddon = if crossStageStatic then "-stage-static" else
|
||||||
"-stage-final";
|
"-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
@ -241,44 +240,62 @@ stdenv.mkDerivation ({
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
# Basic dependencies
|
||||||
${if enableShared then "" else "--disable-shared"}
|
[
|
||||||
${if ppl != null then "--with-ppl=${ppl}" else ""}
|
"--with-gmp=${gmp.dev}"
|
||||||
${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
|
"--with-mpfr=${mpfr.dev}"
|
||||||
${if langJava then
|
"--with-mpc=${libmpc}"
|
||||||
"--with-ecj-jar=${javaEcj} " +
|
] ++
|
||||||
|
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||||
|
|
||||||
|
# Basic configuration
|
||||||
|
[
|
||||||
|
"--disable-libstdcxx-pch"
|
||||||
|
"--without-included-gettext"
|
||||||
|
"--with-system-zlib"
|
||||||
|
"--enable-languages=${
|
||||||
|
concatStrings (intersperse ","
|
||||||
|
( optional langC "c"
|
||||||
|
++ optional langCC "c++"
|
||||||
|
++ optional langFortran "fortran"
|
||||||
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
] ++
|
||||||
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
|
optional (!enableShared) "--disable-shared" ++
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
optional (cloogppl != null) "--with-cloog=${cloogppl}" ++
|
||||||
|
optional (ppl != null) "--with-ppl=${ppl}" ++
|
||||||
|
|
||||||
|
# Java options
|
||||||
|
optionals langJava [
|
||||||
|
"--with-ecj-jar=${javaEcj}"
|
||||||
|
|
||||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
"--enable-java-home"
|
||||||
else ""}
|
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
] ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
--with-gmp=${gmp.dev}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||||
--with-mpfr=${mpfr.dev}
|
|
||||||
--with-mpc=${libmpc}
|
# Ada
|
||||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
# Cross-compilation
|
||||||
--with-system-zlib
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
# Platform-specific flags
|
||||||
( optional langC "c"
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
++ optional langCC "c++"
|
# Trick that should be taken out once we have a mips64el-linux not loongson2f
|
||||||
++ optional langFortran "fortran"
|
optional (targetPlatform == hostPlatform && stdenv.system == "mips64el-linux") "--with-arch=loongson2f"
|
||||||
++ optional langJava "java"
|
;
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${ # Trick that should be taken out once we have a mips64el-linux not loongson2f
|
|
||||||
if targetPlatform == hostPlatform && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
";
|
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
@ -295,37 +312,41 @@ stdenv.mkDerivation ({
|
|||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (!enableShared) "--disable-shared" ++
|
||||||
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
|
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
|
||||||
${if cloogppl != null then "--with-cloog=${cloogppl.crossDrv}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
optional (ppl != null) "--with-ppl=${ppl.crossDrv}" ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
optional (cloogppl != null) "--with-cloog=${cloogppl.crossDrv}" ++
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
[
|
||||||
--with-mpc=${libmpc.crossDrv}
|
"--with-gmp=${gmp.crossDrv}"
|
||||||
--disable-libstdcxx-pch
|
"--with-mpfr=${mpfr.crossDrv}"
|
||||||
--without-included-gettext
|
"--with-mpc=${libmpc.crossDrv}"
|
||||||
--with-system-zlib
|
"--disable-libstdcxx-pch"
|
||||||
--enable-languages=${
|
"--without-included-gettext"
|
||||||
concatStrings (intersperse ","
|
"--with-system-zlib"
|
||||||
( optional langC "c"
|
"--enable-languages=${
|
||||||
++ optional langCC "c++"
|
concatStrings (intersperse ","
|
||||||
++ optional langFortran "fortran"
|
( optional langC "c"
|
||||||
++ optional langJava "java"
|
++ optional langCC "c++"
|
||||||
++ optional langAda "ada"
|
++ optional langFortran "fortran"
|
||||||
++ optional langVhdl "vhdl"
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}"
|
||||||
}
|
] ++
|
||||||
${if langAda then " --enable-libada" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
${if targetplatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
optional (targetPlatform != hostPlatform) crossConfigureFlags
|
||||||
'';
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
@ -108,102 +108,81 @@ let version = "4.8.5";
|
|||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
mkPlatformFlags = platform: let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = platform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = platform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = platform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = platform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = platform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = platform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
in
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||||
in
|
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||||
withArch +
|
|
||||||
withCpu +
|
|
||||||
withAbi +
|
|
||||||
withFpu +
|
|
||||||
withFloat +
|
|
||||||
withMode;
|
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Cross-gcc settings (build == host != target) */
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags = let
|
crossConfigureFlags =
|
||||||
gccArch = targetPlatform.gcc.arch or null;
|
mkPlatformFlags targetPlatform ++
|
||||||
gccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
gccAbi = targetPlatform.gcc.abi or null;
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
gccFpu = targetPlatform.gcc.fpu or null;
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
gccFloat = targetPlatform.gcc.float or null;
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
gccMode = targetPlatform.gcc.mode or null;
|
(if crossMingw && crossStageStatic then [
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
"--with-headers=${libcCross}/include"
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
"--with-gcc"
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
"--with-gnu-as"
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
"--with-gnu-ld"
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
"--with-gnu-ld"
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
"--disable-shared"
|
||||||
in
|
"--disable-nls"
|
||||||
withArch +
|
"--disable-debug"
|
||||||
withCpu +
|
"--enable-sjlj-exceptions"
|
||||||
withAbi +
|
"--enable-threads=win32"
|
||||||
withFpu +
|
"--disable-win32-registry"
|
||||||
withFloat +
|
] else if crossStageStatic then [
|
||||||
withMode +
|
"--disable-libssp"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
"--disable-nls"
|
||||||
" --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
|
"--without-headers"
|
||||||
" --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
|
"--disable-threads"
|
||||||
(if crossMingw && crossStageStatic then
|
"--disable-libgomp"
|
||||||
" --with-headers=${libcCross}/include" +
|
"--disable-libquadmath"
|
||||||
" --with-gcc" +
|
"--disable-shared"
|
||||||
" --with-gnu-as" +
|
"--disable-libatomic" # libatomic requires libc
|
||||||
" --with-gnu-ld" +
|
"--disable-decimal-float" # libdecnumber requires libc
|
||||||
" --with-gnu-ld" +
|
] else [
|
||||||
" --disable-shared" +
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
" --disable-nls" +
|
else "--with-headers=${getDev libcCross}/include")
|
||||||
" --disable-debug" +
|
"--enable-__cxa_atexit"
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-long-long"
|
||||||
" --enable-threads=win32" +
|
] ++
|
||||||
" --disable-win32-registry"
|
(if crossMingw then [
|
||||||
else if crossStageStatic then
|
"--enable-threads=win32"
|
||||||
" --disable-libssp --disable-nls" +
|
"--enable-sjlj-exceptions"
|
||||||
" --without-headers" +
|
"--enable-hash-synchronization"
|
||||||
" --disable-threads " +
|
"--disable-libssp"
|
||||||
" --disable-libmudflap " +
|
"--disable-nls"
|
||||||
" --disable-libgomp " +
|
"--with-dwarf2"
|
||||||
" --disable-libquadmath" +
|
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
||||||
" --disable-shared" +
|
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
# unless adding "-lsupc++" to any linking command. I don't know why.
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
"--disable-shared"
|
||||||
else
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
(if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
|
"--enable-fully-dynamic-string"
|
||||||
else " --with-headers=${libcCross.dev}/include") +
|
] else
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
optionals (targetPlatform.libc == "uclibc") [
|
||||||
" --enable-__cxa_atexit" +
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
" --enable-long-long" +
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
(if crossMingw then
|
"--disable-libgomp"
|
||||||
" --enable-threads=win32" +
|
] ++ [
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-threads=posix"
|
||||||
" --enable-hash-synchronization" +
|
"--enable-nls"
|
||||||
" --disable-libssp" +
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
" --disable-nls" +
|
]));
|
||||||
" --with-dwarf2" +
|
|
||||||
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
|
||||||
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
|
||||||
# unless adding "-lsupc++" to any linking command. I don't know why.
|
|
||||||
" --disable-shared" +
|
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
|
||||||
" --enable-fully-dynamic-string"
|
|
||||||
else (if targetPlatform.libc == "uclibc" then
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
" --disable-libgomp" else "") +
|
|
||||||
" --enable-threads=posix" +
|
|
||||||
" --enable-nls" +
|
|
||||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
|
||||||
);
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
@ -329,63 +308,92 @@ stdenv.mkDerivation ({
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags =
|
||||||
${if hostPlatform.isSunOS then
|
# Basic dependencies
|
||||||
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
|
[
|
||||||
# On Illumos/Solaris GNU as is preferred
|
"--with-gmp-include=${gmp.dev}/include"
|
||||||
" --with-gnu-as --without-gnu-ld "
|
"--with-gmp-lib=${gmp.out}/lib"
|
||||||
else ""}
|
"--with-mpfr-include=${mpfr.dev}/include"
|
||||||
--enable-lto
|
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||||
${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"}
|
"--with-mpc=${libmpc}"
|
||||||
${if enableShared then "" else "--disable-shared"}
|
] ++
|
||||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
|
||||||
${optionalString (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl"}
|
# Basic configuration
|
||||||
${if langJava then
|
[
|
||||||
"--with-ecj-jar=${javaEcj} " +
|
"--enable-lto"
|
||||||
|
"--disable-libstdcxx-pch"
|
||||||
|
"--without-included-gettext"
|
||||||
|
"--with-system-zlib"
|
||||||
|
"--enable-static"
|
||||||
|
"--enable-languages=${
|
||||||
|
concatStrings (intersperse ","
|
||||||
|
( optional langC "c"
|
||||||
|
++ optional langCC "c++"
|
||||||
|
++ optional langFortran "fortran"
|
||||||
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
++ optional langObjC "objc"
|
||||||
|
++ optional langObjCpp "obj-c++"
|
||||||
|
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
optional (isl != null) "--with-isl=${isl}" ++
|
||||||
|
optionals (cloog != null) [
|
||||||
|
"--with-cloog=${cloog}"
|
||||||
|
"--disable-cloog-version-check"
|
||||||
|
"--enable-cloog-backend=isl"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
(if enableMultilib
|
||||||
|
then ["--enable-multilib" "--disable-libquadmath"]
|
||||||
|
else ["--disable-multilib"]) ++
|
||||||
|
optional (!enableShared) "--disable-shared" ++
|
||||||
|
(if enablePlugin
|
||||||
|
then ["--enable-plugin"]
|
||||||
|
else ["--disable-plugin"]) ++
|
||||||
|
|
||||||
|
# Java options
|
||||||
|
optionals langJava [
|
||||||
|
"--with-ecj-jar=${javaEcj}"
|
||||||
|
|
||||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
"--enable-java-home"
|
||||||
else ""}
|
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
] ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
--with-gmp-include=${gmp.dev}/include
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||||
--with-gmp-lib=${gmp.out}/lib
|
|
||||||
--with-mpfr-include=${mpfr.dev}/include
|
# Ada
|
||||||
--with-mpfr-lib=${mpfr.out}/lib
|
optional langAda "--enable-libada" ++
|
||||||
--with-mpc=${libmpc}
|
|
||||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
# Cross-compilation
|
||||||
--disable-libstdcxx-pch
|
optional (targetPlatform == hostPlatform) (
|
||||||
--without-included-gettext
|
let incDir = if hostPlatform.isDarwin
|
||||||
--with-system-zlib
|
then "${darwin.usr-include}"
|
||||||
--enable-static
|
else "${getDev stdenv.cc.libc}/include";
|
||||||
--enable-languages=${
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
concatStrings (intersperse ","
|
) ++
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
||||||
++ optional langFortran "fortran"
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
++ optional langJava "java"
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
# Platform-specific flags
|
||||||
++ optional langGo "go"
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
++ optional langObjC "objc"
|
optionals hostPlatform.isSunOS [
|
||||||
++ optional langObjCpp "obj-c++"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
# On Illumos/Solaris GNU as is preferred
|
||||||
)
|
"--with-gnu-as" "--without-gnu-ld"
|
||||||
)
|
]
|
||||||
}
|
;
|
||||||
${if targetPlatform == hostPlatform
|
|
||||||
then if hostPlatform.isDarwin
|
|
||||||
then " --with-native-system-header-dir=${darwin.usr-include}"
|
|
||||||
else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
|
|
||||||
else ""}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
|
||||||
";
|
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
@ -404,11 +412,6 @@ stdenv.mkDerivation ({
|
|||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
xgccAbi = targetPlatform.gcc.abi or null;
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
xgccFpu = targetPlatform.gcc.fpu or null;
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
xgccFloat = targetPlatform.gcc.float or null;
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
in {
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
@ -422,38 +425,40 @@ stdenv.mkDerivation ({
|
|||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (!enableShared) "--disable-shared" ++
|
||||||
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
|
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
optional (cloog != null) "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" ++
|
||||||
--with-gmp=${gmp.crossDrv}
|
[
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
"--with-gmp=${gmp.crossDrv}"
|
||||||
--with-mpc=${libmpc.crossDrv}
|
"--with-mpfr=${mpfr.crossDrv}"
|
||||||
--disable-libstdcxx-pch
|
"--with-mpc=${libmpc.crossDrv}"
|
||||||
--without-included-gettext
|
"--disable-libstdcxx-pch"
|
||||||
--with-system-zlib
|
"--without-included-gettext"
|
||||||
--enable-languages=${
|
"--with-system-zlib"
|
||||||
concatStrings (intersperse ","
|
"--enable-languages=${
|
||||||
( optional langC "c"
|
concatStrings (intersperse ","
|
||||||
++ optional langCC "c++"
|
( optional langC "c"
|
||||||
++ optional langFortran "fortran"
|
++ optional langCC "c++"
|
||||||
++ optional langJava "java"
|
++ optional langFortran "fortran"
|
||||||
++ optional langAda "ada"
|
++ optional langJava "java"
|
||||||
++ optional langVhdl "vhdl"
|
++ optional langAda "ada"
|
||||||
++ optional langGo "go"
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}"
|
||||||
}
|
] ++
|
||||||
${if langAda then " --enable-libada" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
${xwithArch}
|
optional (xgccArch != null) "--with-arch=${xgccArch}" ++
|
||||||
${xwithCpu}
|
optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++
|
||||||
${xwithAbi}
|
optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++
|
||||||
${xwithFpu}
|
optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++
|
||||||
${xwithFloat}
|
optional (xgccFloat != null) "--with-float=${xgccFloat}"
|
||||||
'';
|
;
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,107 +99,88 @@ let version = "4.9.4";
|
|||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
mkPlatformFlags = platform: let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = platform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = platform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = platform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = platform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = platform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = platform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
in
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||||
in
|
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||||
withArch +
|
|
||||||
withCpu +
|
|
||||||
withAbi +
|
|
||||||
withFpu +
|
|
||||||
withFloat +
|
|
||||||
withMode;
|
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Cross-gcc settings (build == host != target) */
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags = let
|
crossConfigureFlags =
|
||||||
gccArch = targetPlatform.gcc.arch or null;
|
mkPlatformFlags targetPlatform ++
|
||||||
gccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
gccAbi = targetPlatform.gcc.abi or null;
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
gccFpu = targetPlatform.gcc.fpu or null;
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
gccFloat = targetPlatform.gcc.float or null;
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
gccMode = targetPlatform.gcc.mode or null;
|
(if crossMingw && crossStageStatic then [
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
"--with-headers=${libcCross}/include"
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
"--with-gcc"
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
"--with-gnu-as"
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
"--with-gnu-ld"
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
"--with-gnu-ld"
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
"--disable-shared"
|
||||||
in
|
"--disable-nls"
|
||||||
withArch +
|
"--disable-debug"
|
||||||
withCpu +
|
"--enable-sjlj-exceptions"
|
||||||
withAbi +
|
"--enable-threads=win32"
|
||||||
withFpu +
|
"--disable-win32-registry"
|
||||||
withFloat +
|
] else if crossStageStatic then [
|
||||||
withMode +
|
"--disable-libssp"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
"--disable-nls"
|
||||||
" --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
|
"--without-headers"
|
||||||
" --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
|
"--disable-threads"
|
||||||
(if crossMingw && crossStageStatic then
|
"--disable-libgomp"
|
||||||
" --with-headers=${libcCross}/include" +
|
"--disable-libquadmath"
|
||||||
" --with-gcc" +
|
"--disable-shared"
|
||||||
" --with-gnu-as" +
|
"--disable-libatomic" # libatomic requires libc
|
||||||
" --with-gnu-ld" +
|
"--disable-decimal-float" # libdecnumber requires libc
|
||||||
" --with-gnu-ld" +
|
] else [
|
||||||
" --disable-shared" +
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
" --disable-nls" +
|
else "--with-headers=${getDev libcCross}/include")
|
||||||
" --disable-debug" +
|
"--enable-__cxa_atexit"
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-long-long"
|
||||||
" --enable-threads=win32" +
|
] ++
|
||||||
" --disable-win32-registry"
|
(if crossMingw then [
|
||||||
else if crossStageStatic then
|
"--enable-threads=win32"
|
||||||
" --disable-libssp --disable-nls" +
|
"--enable-sjlj-exceptions"
|
||||||
" --without-headers" +
|
"--enable-hash-synchronization"
|
||||||
" --disable-threads " +
|
"--disable-libssp"
|
||||||
" --disable-libgomp " +
|
"--disable-nls"
|
||||||
" --disable-libquadmath" +
|
"--with-dwarf2"
|
||||||
" --disable-shared" +
|
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
# unless adding "-lsupc++" to any linking command. I don't know why.
|
||||||
else
|
"--disable-shared"
|
||||||
(if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
else " --with-headers=${libcCross.dev}/include") +
|
"--enable-fully-dynamic-string"
|
||||||
" --enable-__cxa_atexit" +
|
] else
|
||||||
" --enable-long-long" +
|
optionals (targetPlatform.libc == "uclibc") [
|
||||||
(if crossMingw then
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
" --enable-threads=win32" +
|
# available in uclibc.
|
||||||
" --enable-sjlj-exceptions" +
|
"--disable-libsanitizer"
|
||||||
" --enable-hash-synchronization" +
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
" --disable-libssp" +
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
" --disable-nls" +
|
"--disable-libgomp"
|
||||||
" --with-dwarf2" +
|
] ++ [
|
||||||
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
"--enable-threads=posix"
|
||||||
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
"--enable-nls"
|
||||||
# unless adding "-lsupc++" to any linking command. I don't know why.
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
" --disable-shared" +
|
]));
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
|
||||||
" --enable-fully-dynamic-string"
|
|
||||||
else (if targetPlatform.libc == "uclibc" then
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
" --disable-libsanitizer" +
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
" --disable-libgomp" else "") +
|
|
||||||
" --enable-threads=posix" +
|
|
||||||
" --enable-nls" +
|
|
||||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
|
||||||
);
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -326,61 +307,91 @@ stdenv.mkDerivation ({
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags =
|
||||||
${if hostPlatform.isSunOS then
|
# Basic dependencies
|
||||||
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
|
[
|
||||||
# On Illumos/Solaris GNU as is preferred
|
"--with-gmp-include=${gmp.dev}/include"
|
||||||
" --with-gnu-as --without-gnu-ld "
|
"--with-gmp-lib=${gmp.out}/lib"
|
||||||
else ""}
|
"--with-mpfr=${mpfr.dev}"
|
||||||
--enable-lto
|
"--with-mpc=${libmpc}"
|
||||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
] ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
|
||||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
# Basic configuration
|
||||||
${optionalString (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl"}
|
[
|
||||||
${if langJava then
|
"--enable-lto"
|
||||||
"--with-ecj-jar=${javaEcj} " +
|
"--disable-libstdcxx-pch"
|
||||||
|
"--without-included-gettext"
|
||||||
|
"--with-system-zlib"
|
||||||
|
"--enable-static"
|
||||||
|
"--enable-languages=${
|
||||||
|
concatStrings (intersperse ","
|
||||||
|
( optional langC "c"
|
||||||
|
++ optional langCC "c++"
|
||||||
|
++ optional langFortran "fortran"
|
||||||
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
++ optional langObjC "objc"
|
||||||
|
++ optional langObjCpp "obj-c++"
|
||||||
|
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
(if enableMultilib
|
||||||
|
then ["--enable-multilib" "--disable-libquadmath"]
|
||||||
|
else ["--disable-multilib"]) ++
|
||||||
|
optional (!enableShared) "--disable-shared" ++
|
||||||
|
(if enablePlugin
|
||||||
|
then ["--enable-plugin"]
|
||||||
|
else ["--disable-plugin"]) ++
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
optional (isl != null) "--with-isl=${isl}" ++
|
||||||
|
optionals (cloog != null) [
|
||||||
|
"--with-cloog=${cloog}"
|
||||||
|
"--disable-cloog-version-check"
|
||||||
|
"--enable-cloog-backend=isl"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
# Java options
|
||||||
|
optionals langJava [
|
||||||
|
"--with-ecj-jar=${javaEcj}"
|
||||||
|
|
||||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
"--enable-java-home"
|
||||||
else ""}
|
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
] ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
--with-gmp=${gmp.dev}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||||
--with-mpfr=${mpfr.dev}
|
|
||||||
--with-mpc=${libmpc}
|
# Ada
|
||||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
# Cross-compilation
|
||||||
--with-system-zlib
|
optional (targetPlatform == hostPlatform) (
|
||||||
--enable-static
|
let incDir = if hostPlatform.isDarwin
|
||||||
--enable-languages=${
|
then "${darwin.usr-include}"
|
||||||
concatStrings (intersperse ","
|
else "${getDev stdenv.cc.libc}/include";
|
||||||
( optional langC "c"
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
++ optional langCC "c++"
|
) ++
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
||||||
++ optional langAda "ada"
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
++ optional langVhdl "vhdl"
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
++ optional langGo "go"
|
|
||||||
++ optional langObjC "objc"
|
# Platform-specific flags
|
||||||
++ optional langObjCpp "obj-c++"
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
optionals hostPlatform.isSunOS [
|
||||||
)
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
)
|
# On Illumos/Solaris GNU as is preferred
|
||||||
}
|
"--with-gnu-as" "--without-gnu-ld"
|
||||||
${if targetPlatform == hostPlatform
|
]
|
||||||
then if hostPlatform.isDarwin
|
;
|
||||||
then " --with-native-system-header-dir=${darwin.usr-include}"
|
|
||||||
else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
|
|
||||||
else ""}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
|
||||||
";
|
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
@ -393,17 +404,13 @@ stdenv.mkDerivation ({
|
|||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = let
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
xgccArch = targetPlatform.gcc.arch or null;
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
xgccCpu = targetPlatform.gcc.cpu or null;
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
xgccAbi = targetPlatform.gcc.abi or null;
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
xgccFpu = targetPlatform.gcc.fpu or null;
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
xgccFloat = targetPlatform.gcc.float or null;
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
in {
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
@ -417,38 +424,40 @@ stdenv.mkDerivation ({
|
|||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (!enableShared) "--disable-shared" ++
|
||||||
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
|
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
optional (cloog != null) "--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl" ++
|
||||||
--with-gmp=${gmp.crossDrv}
|
[
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
"--with-gmp=${gmp.crossDrv}"
|
||||||
--with-mpc=${libmpc.crossDrv}
|
"--with-mpfr=${mpfr.crossDrv}"
|
||||||
--disable-libstdcxx-pch
|
"--with-mpc=${libmpc.crossDrv}"
|
||||||
--without-included-gettext
|
"--disable-libstdcxx-pch"
|
||||||
--with-system-zlib
|
"--without-included-gettext"
|
||||||
--enable-languages=${
|
"--with-system-zlib"
|
||||||
concatStrings (intersperse ","
|
"--enable-languages=${
|
||||||
( optional langC "c"
|
concatStrings (intersperse ","
|
||||||
++ optional langCC "c++"
|
( optional langC "c"
|
||||||
++ optional langFortran "fortran"
|
++ optional langCC "c++"
|
||||||
++ optional langJava "java"
|
++ optional langFortran "fortran"
|
||||||
++ optional langAda "ada"
|
++ optional langJava "java"
|
||||||
++ optional langVhdl "vhdl"
|
++ optional langAda "ada"
|
||||||
++ optional langGo "go"
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}"
|
||||||
}
|
] ++
|
||||||
${if langAda then " --enable-libada" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
${xwithArch}
|
optional (xgccArch != null) "--with-arch=${xgccArch}" ++
|
||||||
${xwithCpu}
|
optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++
|
||||||
${xwithAbi}
|
optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++
|
||||||
${xwithFpu}
|
optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++
|
||||||
${xwithFloat}
|
optional (xgccFloat != null) "--with-float=${xgccFloat}"
|
||||||
'';
|
;
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,107 +103,88 @@ let version = "5.5.0";
|
|||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
mkPlatformFlags = platform: let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = platform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = platform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = platform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = platform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = platform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = platform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
in
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||||
in
|
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||||
withArch +
|
|
||||||
withCpu +
|
|
||||||
withAbi +
|
|
||||||
withFpu +
|
|
||||||
withFloat +
|
|
||||||
withMode;
|
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Cross-gcc settings (build == host != target) */
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags = let
|
crossConfigureFlags =
|
||||||
gccArch = targetPlatform.gcc.arch or null;
|
mkPlatformFlags targetPlatform ++
|
||||||
gccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
gccAbi = targetPlatform.gcc.abi or null;
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
gccFpu = targetPlatform.gcc.fpu or null;
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
gccFloat = targetPlatform.gcc.float or null;
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
gccMode = targetPlatform.gcc.mode or null;
|
(if crossMingw && crossStageStatic then [
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
"--with-headers=${libcCross}/include"
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
"--with-gcc"
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
"--with-gnu-as"
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
"--with-gnu-ld"
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
"--with-gnu-ld"
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
"--disable-shared"
|
||||||
in
|
"--disable-nls"
|
||||||
withArch +
|
"--disable-debug"
|
||||||
withCpu +
|
"--enable-sjlj-exceptions"
|
||||||
withAbi +
|
"--enable-threads=win32"
|
||||||
withFpu +
|
"--disable-win32-registry"
|
||||||
withFloat +
|
] else if crossStageStatic then [
|
||||||
withMode +
|
"--disable-libssp"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
"--disable-nls"
|
||||||
" --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
|
"--without-headers"
|
||||||
" --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
|
"--disable-threads"
|
||||||
(if crossMingw && crossStageStatic then
|
"--disable-libgomp"
|
||||||
" --with-headers=${libcCross}/include" +
|
"--disable-libquadmath"
|
||||||
" --with-gcc" +
|
"--disable-shared"
|
||||||
" --with-gnu-as" +
|
"--disable-libatomic" # libatomic requires libc
|
||||||
" --with-gnu-ld" +
|
"--disable-decimal-float" # libdecnumber requires libc
|
||||||
" --with-gnu-ld" +
|
] else [
|
||||||
" --disable-shared" +
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
" --disable-nls" +
|
else "--with-headers=${getDev libcCross}/include")
|
||||||
" --disable-debug" +
|
"--enable-__cxa_atexit"
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-long-long"
|
||||||
" --enable-threads=win32" +
|
] ++
|
||||||
" --disable-win32-registry"
|
(if crossMingw then [
|
||||||
else if crossStageStatic then
|
"--enable-threads=win32"
|
||||||
" --disable-libssp --disable-nls" +
|
"--enable-sjlj-exceptions"
|
||||||
" --without-headers" +
|
"--enable-hash-synchronization"
|
||||||
" --disable-threads " +
|
"--disable-libssp"
|
||||||
" --disable-libgomp " +
|
"--disable-nls"
|
||||||
" --disable-libquadmath" +
|
"--with-dwarf2"
|
||||||
" --disable-shared" +
|
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
# unless adding "-lsupc++" to any linking command. I don't know why.
|
||||||
else
|
"--disable-shared"
|
||||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
else " --with-headers=${getDev libcCross}/include") +
|
"--enable-fully-dynamic-string"
|
||||||
" --enable-__cxa_atexit" +
|
] else
|
||||||
" --enable-long-long" +
|
optionals (targetPlatform.libc == "uclibc") [
|
||||||
(if crossMingw then
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
" --enable-threads=win32" +
|
# available in uclibc.
|
||||||
" --enable-sjlj-exceptions" +
|
"--disable-libsanitizer"
|
||||||
" --enable-hash-synchronization" +
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
" --disable-libssp" +
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
" --disable-nls" +
|
"--disable-libgomp"
|
||||||
" --with-dwarf2" +
|
] ++ [
|
||||||
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
"--enable-threads=posix"
|
||||||
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
"--enable-nls"
|
||||||
# unless adding "-lsupc++" to any linking command. I don't know why.
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
" --disable-shared" +
|
]));
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
|
||||||
" --enable-fully-dynamic-string"
|
|
||||||
else (if targetPlatform.libc == "uclibc" then
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
" --disable-libsanitizer" +
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
" --disable-libgomp" else "") +
|
|
||||||
" --enable-threads=posix" +
|
|
||||||
" --enable-nls" +
|
|
||||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
|
||||||
);
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -340,62 +321,87 @@ stdenv.mkDerivation ({
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags =
|
||||||
${if hostPlatform.isSunOS then
|
# Basic dependencies
|
||||||
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
|
[
|
||||||
# On Illumos/Solaris GNU as is preferred
|
"--with-gmp-include=${gmp.dev}/include"
|
||||||
" --with-gnu-as --without-gnu-ld "
|
"--with-gmp-lib=${gmp.out}/lib"
|
||||||
else ""}
|
"--with-mpfr-include=${mpfr.dev}/include"
|
||||||
--enable-lto
|
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
"--with-mpc=${libmpc}"
|
||||||
${if enableShared then "" else "--disable-shared"}
|
] ++
|
||||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
|
||||||
${if langJava then
|
# Basic configuration
|
||||||
"--with-ecj-jar=${javaEcj} " +
|
[
|
||||||
|
"--enable-lto"
|
||||||
|
"--disable-libstdcxx-pch"
|
||||||
|
"--without-included-gettext"
|
||||||
|
"--with-system-zlib"
|
||||||
|
"--enable-static"
|
||||||
|
"--enable-languages=${
|
||||||
|
concatStrings (intersperse ","
|
||||||
|
( optional langC "c"
|
||||||
|
++ optional langCC "c++"
|
||||||
|
++ optional langFortran "fortran"
|
||||||
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
++ optional langObjC "objc"
|
||||||
|
++ optional langObjCpp "obj-c++"
|
||||||
|
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
optional (isl != null) "--with-isl=${isl}" ++
|
||||||
|
|
||||||
|
(if enableMultilib
|
||||||
|
then ["--enable-multilib" "--disable-libquadmath"]
|
||||||
|
else ["--disable-multilib"]) ++
|
||||||
|
optional (!enableShared) "--disable-shared" ++
|
||||||
|
(if enablePlugin
|
||||||
|
then ["--enable-plugin"]
|
||||||
|
else ["--disable-plugin"]) ++
|
||||||
|
|
||||||
|
# Java options
|
||||||
|
optionals langJava [
|
||||||
|
"--with-ecj-jar=${javaEcj}"
|
||||||
|
|
||||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
"--enable-java-home"
|
||||||
else ""}
|
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
] ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
--with-gmp-include=${gmp.dev}/include
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||||
--with-gmp-lib=${gmp.out}/lib
|
|
||||||
--with-mpfr-include=${mpfr.dev}/include
|
# Ada
|
||||||
--with-mpfr-lib=${mpfr.out}/lib
|
optional langAda "--enable-libada" ++
|
||||||
--with-mpc=${libmpc}
|
|
||||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
# Cross-compilation
|
||||||
--disable-libstdcxx-pch
|
optional (targetPlatform == hostPlatform) (
|
||||||
--without-included-gettext
|
let incDir = if hostPlatform.isDarwin
|
||||||
--with-system-zlib
|
then "${darwin.usr-include}"
|
||||||
--enable-static
|
else "${getDev stdenv.cc.libc}/include";
|
||||||
--enable-languages=${
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
concatStrings (intersperse ","
|
) ++
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
||||||
++ optional langFortran "fortran"
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
++ optional langJava "java"
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
# Platform-specific flags
|
||||||
++ optional langGo "go"
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
++ optional langObjC "objc"
|
optionals hostPlatform.isSunOS [
|
||||||
++ optional langObjCpp "obj-c++"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
# On Illumos/Solaris GNU as is preferred
|
||||||
)
|
"--with-gnu-as" "--without-gnu-ld"
|
||||||
)
|
]
|
||||||
}
|
;
|
||||||
${if targetPlatform == hostPlatform
|
|
||||||
then if hostPlatform.isDarwin
|
|
||||||
then " --with-native-system-header-dir=${darwin.usr-include}"
|
|
||||||
else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
|
|
||||||
else ""}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
|
||||||
";
|
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
@ -408,17 +414,13 @@ stdenv.mkDerivation ({
|
|||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = let
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
xgccArch = targetPlatform.gcc.arch or null;
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
xgccCpu = targetPlatform.gcc.cpu or null;
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
xgccAbi = targetPlatform.gcc.abi or null;
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
xgccFpu = targetPlatform.gcc.fpu or null;
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
xgccFloat = targetPlatform.gcc.float or null;
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
in {
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
@ -432,37 +434,39 @@ stdenv.mkDerivation ({
|
|||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (!enableShared) "--disable-shared" ++
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
|
||||||
--with-gmp=${gmp.crossDrv}
|
[
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
"--with-gmp=${gmp.crossDrv}"
|
||||||
--with-mpc=${libmpc.crossDrv}
|
"--with-mpfr=${mpfr.crossDrv}"
|
||||||
--disable-libstdcxx-pch
|
"--with-mpc=${libmpc.crossDrv}"
|
||||||
--without-included-gettext
|
"--disable-libstdcxx-pch"
|
||||||
--with-system-zlib
|
"--without-included-gettext"
|
||||||
--enable-languages=${
|
"--with-system-zlib"
|
||||||
concatStrings (intersperse ","
|
"--enable-languages=${
|
||||||
( optional langC "c"
|
concatStrings (intersperse ","
|
||||||
++ optional langCC "c++"
|
( optional langC "c"
|
||||||
++ optional langFortran "fortran"
|
++ optional langCC "c++"
|
||||||
++ optional langJava "java"
|
++ optional langFortran "fortran"
|
||||||
++ optional langAda "ada"
|
++ optional langJava "java"
|
||||||
++ optional langVhdl "vhdl"
|
++ optional langAda "ada"
|
||||||
++ optional langGo "go"
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}"
|
||||||
}
|
] ++
|
||||||
${if langAda then " --enable-libada" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
${xwithArch}
|
optional (xgccArch != null) "--with-arch=${xgccArch}" ++
|
||||||
${xwithCpu}
|
optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++
|
||||||
${xwithAbi}
|
optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++
|
||||||
${xwithFpu}
|
optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++
|
||||||
${xwithFloat}
|
optional (xgccFloat != null) "--with-float=${xgccFloat}"
|
||||||
'';
|
;
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,103 +100,84 @@ let version = "6.4.0";
|
|||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
mkPlatformFlags = platform: let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = platform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = platform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = platform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = platform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = platform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = platform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
|
||||||
in
|
in
|
||||||
withArch +
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
withCpu +
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
withAbi +
|
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||||
withFpu +
|
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||||
withFloat +
|
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||||
withMode;
|
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Cross-gcc settings (build == host != target) */
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags = let
|
crossConfigureFlags =
|
||||||
gccArch = targetPlatform.gcc.arch or null;
|
mkPlatformFlags targetPlatform ++
|
||||||
gccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
gccAbi = targetPlatform.gcc.abi or null;
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
gccFpu = targetPlatform.gcc.fpu or null;
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
gccFloat = targetPlatform.gcc.float or null;
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
gccMode = targetPlatform.gcc.mode or null;
|
(if crossMingw && crossStageStatic then [
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
"--with-headers=${libcCross}/include"
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
"--with-gcc"
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
"--with-gnu-as"
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
"--with-gnu-ld"
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
"--with-gnu-ld"
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
"--disable-shared"
|
||||||
in
|
"--disable-nls"
|
||||||
withArch +
|
"--disable-debug"
|
||||||
withCpu +
|
"--enable-sjlj-exceptions"
|
||||||
withAbi +
|
"--enable-threads=win32"
|
||||||
withFpu +
|
"--disable-win32-registry"
|
||||||
withFloat +
|
] else if crossStageStatic then [
|
||||||
withMode +
|
"--disable-libssp"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
"--disable-nls"
|
||||||
" --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
|
"--without-headers"
|
||||||
" --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
|
"--disable-threads"
|
||||||
(if crossMingw && crossStageStatic then
|
"--disable-libgomp"
|
||||||
" --with-headers=${libcCross}/include" +
|
"--disable-libquadmath"
|
||||||
" --with-gcc" +
|
"--disable-shared"
|
||||||
" --with-gnu-as" +
|
"--disable-libatomic" # libatomic requires libc
|
||||||
" --with-gnu-ld" +
|
"--disable-decimal-float" # libdecnumber requires libc
|
||||||
" --with-gnu-ld" +
|
] else [
|
||||||
" --disable-shared" +
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
" --disable-nls" +
|
else "--with-headers=${getDev libcCross}/include")
|
||||||
" --disable-debug" +
|
"--enable-__cxa_atexit"
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-long-long"
|
||||||
" --enable-threads=win32" +
|
] ++
|
||||||
" --disable-win32-registry"
|
(if crossMingw then [
|
||||||
else if crossStageStatic then
|
"--enable-threads=win32"
|
||||||
" --disable-libssp --disable-nls" +
|
"--enable-sjlj-exceptions"
|
||||||
" --without-headers" +
|
"--enable-hash-synchronization"
|
||||||
" --disable-threads " +
|
"--disable-libssp"
|
||||||
" --disable-libgomp " +
|
"--disable-nls"
|
||||||
" --disable-libquadmath" +
|
"--with-dwarf2"
|
||||||
" --disable-shared" +
|
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
# unless adding "-lsupc++" to any linking command. I don't know why.
|
||||||
else
|
"--disable-shared"
|
||||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
else " --with-headers=${getDev libcCross}/include") +
|
"--enable-fully-dynamic-string"
|
||||||
" --enable-__cxa_atexit" +
|
] else
|
||||||
" --enable-long-long" +
|
optionals (targetPlatform.libc == "uclibc") [
|
||||||
(if crossMingw then
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
" --enable-threads=win32" +
|
# available in uclibc.
|
||||||
" --enable-sjlj-exceptions" +
|
"--disable-libsanitizer"
|
||||||
" --enable-hash-synchronization" +
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
" --disable-libssp" +
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
" --disable-nls" +
|
"--disable-libgomp"
|
||||||
" --with-dwarf2" +
|
] ++ [
|
||||||
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
"--enable-threads=posix"
|
||||||
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
"--enable-nls"
|
||||||
# unless adding "-lsupc++" to any linking command. I don't know why.
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
" --disable-shared" +
|
]));
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
|
||||||
" --enable-fully-dynamic-string"
|
|
||||||
else (if targetPlatform.libc == "uclibc" then
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
" --disable-libsanitizer" +
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
" --disable-libgomp" else "") +
|
|
||||||
" --enable-threads=posix" +
|
|
||||||
" --enable-nls" +
|
|
||||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
|
||||||
);
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
@ -341,85 +322,104 @@ stdenv.mkDerivation ({
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags =
|
||||||
${if hostPlatform.isSunOS then
|
# Basic dependencies
|
||||||
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
|
[
|
||||||
# On Illumos/Solaris GNU as is preferred
|
"--with-gmp-include=${gmp.dev}/include"
|
||||||
" --with-gnu-as --without-gnu-ld "
|
"--with-gmp-lib=${gmp.out}/lib"
|
||||||
else ""}
|
"--with-mpfr-include=${mpfr.dev}/include"
|
||||||
--enable-lto
|
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
"--with-mpc=${libmpc}"
|
||||||
${if enableShared then "" else "--disable-shared"}
|
] ++
|
||||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
|
||||||
${if langJava then
|
# Basic configuration
|
||||||
"--with-ecj-jar=${javaEcj} " +
|
[
|
||||||
|
"--enable-lto"
|
||||||
|
"--disable-libstdcxx-pch"
|
||||||
|
"--without-included-gettext"
|
||||||
|
"--with-system-zlib"
|
||||||
|
"--enable-static"
|
||||||
|
"--enable-languages=${
|
||||||
|
concatStrings (intersperse ","
|
||||||
|
( optional langC "c"
|
||||||
|
++ optional langCC "c++"
|
||||||
|
++ optional langFortran "fortran"
|
||||||
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
++ optional langObjC "objc"
|
||||||
|
++ optional langObjCpp "obj-c++"
|
||||||
|
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
(if enableMultilib
|
||||||
|
then ["--enable-multilib" "--disable-libquadmath"]
|
||||||
|
else ["--disable-multilib"]) ++
|
||||||
|
optional (!enableShared) "--disable-shared" ++
|
||||||
|
(if enablePlugin
|
||||||
|
then ["--enable-plugin"]
|
||||||
|
else ["--disable-plugin"]) ++
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
optional (isl != null) "--with-isl=${isl}" ++
|
||||||
|
|
||||||
|
# Java options
|
||||||
|
optionals langJava [
|
||||||
|
"--with-ecj-jar=${javaEcj}"
|
||||||
|
|
||||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
"--enable-java-home"
|
||||||
else ""}
|
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
] ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
--with-gmp-include=${gmp.dev}/include
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||||
--with-gmp-lib=${gmp.out}/lib
|
|
||||||
--with-mpfr-include=${mpfr.dev}/include
|
# Ada
|
||||||
--with-mpfr-lib=${mpfr.out}/lib
|
optional langAda "--enable-libada" ++
|
||||||
--with-mpc=${libmpc}
|
|
||||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
# Cross compilation
|
||||||
--disable-libstdcxx-pch
|
optional (targetPlatform == hostPlatform) (
|
||||||
--without-included-gettext
|
let incDir = if hostPlatform.isDarwin
|
||||||
--with-system-zlib
|
then "${darwin.usr-include}"
|
||||||
--enable-static
|
else "${getDev stdenv.cc.libc}/include";
|
||||||
--enable-languages=${
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
concatStrings (intersperse ","
|
) ++
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
++ optional langFortran "fortran"
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
# Platform-specific flags
|
||||||
++ optional langVhdl "vhdl"
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
++ optional langGo "go"
|
optionals (hostPlatform.isSunOS) [
|
||||||
++ optional langObjC "objc"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
++ optional langObjCpp "obj-c++"
|
# On Illumos/Solaris GNU as is preferred
|
||||||
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
"--with-gnu-as" "--without-gnu-ld"
|
||||||
)
|
]
|
||||||
)
|
;
|
||||||
}
|
|
||||||
${if targetPlatform == hostPlatform
|
|
||||||
then if hostPlatform.isDarwin
|
|
||||||
then " --with-native-system-header-dir=${darwin.usr-include}"
|
|
||||||
else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
|
|
||||||
else ""}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
|
||||||
";
|
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
buildFlags = if bootstrap then
|
buildFlags =
|
||||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
|
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||||
else "";
|
|
||||||
|
|
||||||
installTargets =
|
installTargets =
|
||||||
if stripped
|
if stripped
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = let
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
xgccArch = targetPlatform.gcc.arch or null;
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
xgccCpu = targetPlatform.gcc.cpu or null;
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
xgccAbi = targetPlatform.gcc.abi or null;
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
xgccFpu = targetPlatform.gcc.fpu or null;
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
xgccFloat = targetPlatform.gcc.float or null;
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
in {
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
@ -433,37 +433,39 @@ stdenv.mkDerivation ({
|
|||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (!enableShared) "--disable-shared" ++
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
|
||||||
--with-gmp=${gmp.crossDrv}
|
[
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
"--with-gmp=${gmp.crossDrv}"
|
||||||
--with-mpc=${libmpc.crossDrv}
|
"--with-mpfr=${mpfr.crossDrv}"
|
||||||
--disable-libstdcxx-pch
|
"--with-mpc=${libmpc.crossDrv}"
|
||||||
--without-included-gettext
|
"--disable-libstdcxx-pch"
|
||||||
--with-system-zlib
|
"--without-included-gettext"
|
||||||
--enable-languages=${
|
"--with-system-zlib"
|
||||||
concatStrings (intersperse ","
|
"--enable-languages=${
|
||||||
( optional langC "c"
|
concatStrings (intersperse ","
|
||||||
++ optional langCC "c++"
|
( optional langC "c"
|
||||||
++ optional langFortran "fortran"
|
++ optional langCC "c++"
|
||||||
++ optional langJava "java"
|
++ optional langFortran "fortran"
|
||||||
++ optional langAda "ada"
|
++ optional langJava "java"
|
||||||
++ optional langVhdl "vhdl"
|
++ optional langAda "ada"
|
||||||
++ optional langGo "go"
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}"
|
||||||
}
|
] ++
|
||||||
${if langAda then " --enable-libada" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
${xwithArch}
|
optional (xgccArch != null) "--with-arch=${xgccArch}" ++
|
||||||
${xwithCpu}
|
optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++
|
||||||
${xwithAbi}
|
optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++
|
||||||
${xwithFpu}
|
optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++
|
||||||
${xwithFloat}
|
optional (xgccFloat != null) "--with-float=${xgccFloat}"
|
||||||
'';
|
;
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,108 +98,88 @@ let version = "7.2.0";
|
|||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
mkPlatformFlags = platform: let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = platform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = platform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = platform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = platform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = platform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = platform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
in
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||||
in
|
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||||
withArch +
|
|
||||||
withCpu +
|
|
||||||
withAbi +
|
|
||||||
withFpu +
|
|
||||||
withFloat +
|
|
||||||
withMode;
|
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Cross-gcc settings (build == host != target) */
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags = let
|
crossConfigureFlags =
|
||||||
gccArch = targetPlatform.gcc.arch or null;
|
mkPlatformFlags targetPlatform ++
|
||||||
gccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
gccAbi = targetPlatform.gcc.abi or null;
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
gccFpu = targetPlatform.gcc.fpu or null;
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
gccFloat = targetPlatform.gcc.float or null;
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
gccMode = targetPlatform.gcc.mode or null;
|
(if crossMingw && crossStageStatic then [
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
"--with-headers=${libcCross}/include"
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
"--with-gcc"
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
"--with-gnu-as"
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
"--with-gnu-ld"
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
"--with-gnu-ld"
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
"--disable-shared"
|
||||||
in
|
"--disable-nls"
|
||||||
withArch +
|
"--disable-debug"
|
||||||
withCpu +
|
"--enable-sjlj-exceptions"
|
||||||
withAbi +
|
"--enable-threads=win32"
|
||||||
withFpu +
|
"--disable-win32-registry"
|
||||||
withFloat +
|
] else if crossStageStatic then [
|
||||||
withMode +
|
"--disable-libssp"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
"--disable-nls"
|
||||||
" --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
|
"--without-headers"
|
||||||
" --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
|
"--disable-threads"
|
||||||
(if crossMingw && crossStageStatic then
|
"--disable-libgomp"
|
||||||
" --with-headers=${libcCross}/include" +
|
"--disable-libquadmath"
|
||||||
" --with-gcc" +
|
"--disable-shared"
|
||||||
" --with-gnu-as" +
|
"--disable-libatomic" # libatomic requires libc
|
||||||
" --with-gnu-ld" +
|
"--disable-decimal-float" # libdecnumber requires libc
|
||||||
" --with-gnu-ld" +
|
] else [
|
||||||
" --disable-shared" +
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
" --disable-nls" +
|
else "--with-headers=${getDev libcCross}/include")
|
||||||
" --disable-debug" +
|
"--enable-__cxa_atexit"
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-long-long"
|
||||||
" --enable-threads=win32" +
|
] ++
|
||||||
" --disable-win32-registry"
|
(if crossMingw then [
|
||||||
else if crossStageStatic then
|
"--enable-threads=win32"
|
||||||
" --disable-libssp --disable-nls" +
|
"--enable-sjlj-exceptions"
|
||||||
" --without-headers" +
|
"--enable-hash-synchronization"
|
||||||
" --disable-threads " +
|
"--disable-libssp"
|
||||||
" --disable-libgomp " +
|
"--disable-nls"
|
||||||
" --disable-libquadmath" +
|
"--with-dwarf2"
|
||||||
" --disable-shared" +
|
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
# unless adding "-lsupc++" to any linking command. I don't know why.
|
||||||
else
|
"--disable-shared"
|
||||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
else " --with-headers=${getDev libcCross}/include") +
|
"--enable-fully-dynamic-string"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
] else
|
||||||
" --enable-__cxa_atexit" +
|
optionals (targetPlatform.libc == "uclibc") [
|
||||||
" --enable-long-long" +
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
(if crossMingw then
|
# available in uclibc.
|
||||||
" --enable-threads=win32" +
|
"--disable-libsanitizer"
|
||||||
" --enable-sjlj-exceptions" +
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
" --enable-hash-synchronization" +
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
" --disable-libssp" +
|
"--disable-libgomp"
|
||||||
" --disable-nls" +
|
] ++ [
|
||||||
" --with-dwarf2" +
|
"--enable-threads=posix"
|
||||||
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
"--enable-nls"
|
||||||
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
# unless adding "-lsupc++" to any linking command. I don't know why.
|
]));
|
||||||
" --disable-shared" +
|
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
|
||||||
" --enable-fully-dynamic-string"
|
|
||||||
else (if targetPlatform.libc == "uclibc" then
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
" --disable-libsanitizer" +
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
" --disable-libgomp" else "") +
|
|
||||||
" --enable-threads=posix" +
|
|
||||||
" --enable-nls" +
|
|
||||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
|
||||||
);
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -335,62 +315,87 @@ stdenv.mkDerivation ({
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags =
|
||||||
${if hostPlatform.isSunOS then
|
# Basic dependencies
|
||||||
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
|
[
|
||||||
# On Illumos/Solaris GNU as is preferred
|
"--with-gmp-include=${gmp.dev}/include"
|
||||||
" --with-gnu-as --without-gnu-ld "
|
"--with-gmp-lib=${gmp.out}/lib"
|
||||||
else ""}
|
"--with-mpfr-include=${mpfr.dev}/include"
|
||||||
--enable-lto
|
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
"--with-mpc=${libmpc}"
|
||||||
${if enableShared then "" else "--disable-shared"}
|
] ++
|
||||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
|
||||||
${if langJava then
|
# Basic configuration
|
||||||
"--with-ecj-jar=${javaEcj} " +
|
[
|
||||||
|
"--enable-lto"
|
||||||
|
"--disable-libstdcxx-pch"
|
||||||
|
"--without-included-gettext"
|
||||||
|
"--with-system-zlib"
|
||||||
|
"--enable-static"
|
||||||
|
"--enable-languages=${
|
||||||
|
concatStrings (intersperse ","
|
||||||
|
( optional langC "c"
|
||||||
|
++ optional langCC "c++"
|
||||||
|
++ optional langFortran "fortran"
|
||||||
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
++ optional langObjC "objc"
|
||||||
|
++ optional langObjCpp "obj-c++"
|
||||||
|
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
(if enableMultilib
|
||||||
|
then ["--enable-multilib" "--disable-libquadmath"]
|
||||||
|
else ["--disable-multilib"]) ++
|
||||||
|
optional (!enableShared) "--disable-shared" ++
|
||||||
|
(if enablePlugin
|
||||||
|
then ["--enable-plugin"]
|
||||||
|
else ["--disable-plugin"]) ++
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
optional (isl != null) "--with-isl=${isl}" ++
|
||||||
|
|
||||||
|
# Java options
|
||||||
|
optionals langJava [
|
||||||
|
"--with-ecj-jar=${javaEcj}"
|
||||||
|
|
||||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
"--enable-java-home"
|
||||||
else ""}
|
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
] ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
--with-gmp-include=${gmp.dev}/include
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||||
--with-gmp-lib=${gmp.out}/lib
|
|
||||||
--with-mpfr-include=${mpfr.dev}/include
|
# Ada
|
||||||
--with-mpfr-lib=${mpfr.out}/lib
|
optional langAda "--enable-libada" ++
|
||||||
--with-mpc=${libmpc}
|
|
||||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
# Cross-compilation
|
||||||
--disable-libstdcxx-pch
|
optional (targetPlatform == hostPlatform) (
|
||||||
--without-included-gettext
|
let incDir = if hostPlatform.isDarwin
|
||||||
--with-system-zlib
|
then "${darwin.usr-include}"
|
||||||
--enable-static
|
else "${getDev stdenv.cc.libc}/include";
|
||||||
--enable-languages=${
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
concatStrings (intersperse ","
|
) ++
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
||||||
++ optional langFortran "fortran"
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
++ optional langJava "java"
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
# Platform-specific flags
|
||||||
++ optional langGo "go"
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
++ optional langObjC "objc"
|
optionals hostPlatform.isSunOS [
|
||||||
++ optional langObjCpp "obj-c++"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
# On Illumos/Solaris GNU as is preferred
|
||||||
)
|
"--with-gnu-as" "--without-gnu-ld"
|
||||||
)
|
]
|
||||||
}
|
;
|
||||||
${if targetPlatform == hostPlatform
|
|
||||||
then if hostPlatform.isDarwin
|
|
||||||
then " --with-native-system-header-dir=${darwin.usr-include}"
|
|
||||||
else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
|
|
||||||
else ""}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
|
||||||
";
|
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
@ -403,17 +408,13 @@ stdenv.mkDerivation ({
|
|||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = let
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
xgccArch = targetPlatform.gcc.arch or null;
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
xgccCpu = targetPlatform.gcc.cpu or null;
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
xgccAbi = targetPlatform.gcc.abi or null;
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
xgccFpu = targetPlatform.gcc.fpu or null;
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
xgccFloat = targetPlatform.gcc.float or null;
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
in {
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
@ -427,37 +428,39 @@ stdenv.mkDerivation ({
|
|||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (!enableShared) "--disable-shared" ++
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
|
||||||
--with-gmp=${gmp.crossDrv}
|
[
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
"--with-gmp=${gmp.crossDrv}"
|
||||||
--with-mpc=${libmpc.crossDrv}
|
"--with-mpfr=${mpfr.crossDrv}"
|
||||||
--disable-libstdcxx-pch
|
"--with-mpc=${libmpc.crossDrv}"
|
||||||
--without-included-gettext
|
"--disable-libstdcxx-pch"
|
||||||
--with-system-zlib
|
"--without-included-gettext"
|
||||||
--enable-languages=${
|
"--with-system-zlib"
|
||||||
concatStrings (intersperse ","
|
"--enable-languages=${
|
||||||
( optional langC "c"
|
concatStrings (intersperse ","
|
||||||
++ optional langCC "c++"
|
( optional langC "c"
|
||||||
++ optional langFortran "fortran"
|
++ optional langCC "c++"
|
||||||
++ optional langJava "java"
|
++ optional langFortran "fortran"
|
||||||
++ optional langAda "ada"
|
++ optional langJava "java"
|
||||||
++ optional langVhdl "vhdl"
|
++ optional langAda "ada"
|
||||||
++ optional langGo "go"
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}"
|
||||||
}
|
] ++
|
||||||
${if langAda then " --enable-libada" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
${xwithArch}
|
optional (xgccArch != null) "--with-arch=${xgccArch}" ++
|
||||||
${xwithCpu}
|
optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++
|
||||||
${xwithAbi}
|
optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++
|
||||||
${xwithFpu}
|
optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++
|
||||||
${xwithFloat}
|
optional (xgccFloat != null) "--with-float=${xgccFloat}"
|
||||||
'';
|
;
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,108 +98,88 @@ let version = "7-20170409";
|
|||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
mkPlatformFlags = platform: let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = platform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = platform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = platform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = platform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = platform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = platform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
in
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||||
in
|
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||||
withArch +
|
|
||||||
withCpu +
|
|
||||||
withAbi +
|
|
||||||
withFpu +
|
|
||||||
withFloat +
|
|
||||||
withMode;
|
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Cross-gcc settings (build == host != target) */
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags = let
|
crossConfigureFlags =
|
||||||
gccArch = targetPlatform.gcc.arch or null;
|
mkPlatformFlags targetPlatform ++
|
||||||
gccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
gccAbi = targetPlatform.gcc.abi or null;
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
gccFpu = targetPlatform.gcc.fpu or null;
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
gccFloat = targetPlatform.gcc.float or null;
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
gccMode = targetPlatform.gcc.mode or null;
|
(if crossMingw && crossStageStatic then [
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
"--with-headers=${libcCross}/include"
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
"--with-gcc"
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
"--with-gnu-as"
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
"--with-gnu-ld"
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
"--with-gnu-ld"
|
||||||
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
"--disable-shared"
|
||||||
in
|
"--disable-nls"
|
||||||
withArch +
|
"--disable-debug"
|
||||||
withCpu +
|
"--enable-sjlj-exceptions"
|
||||||
withAbi +
|
"--enable-threads=win32"
|
||||||
withFpu +
|
"--disable-win32-registry"
|
||||||
withFloat +
|
] else if crossStageStatic then [
|
||||||
withMode +
|
"--disable-libssp"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
"--disable-nls"
|
||||||
" --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
|
"--without-headers"
|
||||||
" --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
|
"--disable-threads"
|
||||||
(if crossMingw && crossStageStatic then
|
"--disable-libgomp"
|
||||||
" --with-headers=${libcCross}/include" +
|
"--disable-libquadmath"
|
||||||
" --with-gcc" +
|
"--disable-shared"
|
||||||
" --with-gnu-as" +
|
"--disable-libatomic" # libatomic requires libc
|
||||||
" --with-gnu-ld" +
|
"--disable-decimal-float" # libdecnumber requires libc
|
||||||
" --with-gnu-ld" +
|
] else [
|
||||||
" --disable-shared" +
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
" --disable-nls" +
|
else "--with-headers=${getDev libcCross}/include")
|
||||||
" --disable-debug" +
|
"--enable-__cxa_atexit"
|
||||||
" --enable-sjlj-exceptions" +
|
"--enable-long-long"
|
||||||
" --enable-threads=win32" +
|
] ++
|
||||||
" --disable-win32-registry"
|
(if crossMingw then [
|
||||||
else if crossStageStatic then
|
"--enable-threads=win32"
|
||||||
" --disable-libssp --disable-nls" +
|
"--enable-sjlj-exceptions"
|
||||||
" --without-headers" +
|
"--enable-hash-synchronization"
|
||||||
" --disable-threads " +
|
"--disable-libssp"
|
||||||
" --disable-libgomp " +
|
"--disable-nls"
|
||||||
" --disable-libquadmath" +
|
"--with-dwarf2"
|
||||||
" --disable-shared" +
|
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
# unless adding "-lsupc++" to any linking command. I don't know why.
|
||||||
else
|
"--disable-shared"
|
||||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
else " --with-headers=${getDev libcCross}/include") +
|
"--enable-fully-dynamic-string"
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
] else
|
||||||
" --enable-__cxa_atexit" +
|
optionals (targetPlatform.libc == "uclibc") [
|
||||||
" --enable-long-long" +
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
(if crossMingw then
|
# available in uclibc.
|
||||||
" --enable-threads=win32" +
|
"--disable-libsanitizer"
|
||||||
" --enable-sjlj-exceptions" +
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
" --enable-hash-synchronization" +
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
" --disable-libssp" +
|
"--disable-libgomp"
|
||||||
" --disable-nls" +
|
] ++ [
|
||||||
" --with-dwarf2" +
|
"--enable-threads=posix"
|
||||||
# I think noone uses shared gcc libs in mingw, so we better do the same.
|
"--enable-nls"
|
||||||
# In any case, mingw32 g++ linking is broken by default with shared libs,
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
# unless adding "-lsupc++" to any linking command. I don't know why.
|
]));
|
||||||
" --disable-shared" +
|
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
|
||||||
" --enable-fully-dynamic-string"
|
|
||||||
else (if targetPlatform.libc == "uclibc" then
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
" --disable-libsanitizer" +
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
" --disable-libgomp" else "") +
|
|
||||||
" --enable-threads=posix" +
|
|
||||||
" --enable-nls" +
|
|
||||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
|
||||||
);
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -322,62 +302,87 @@ stdenv.mkDerivation ({
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags =
|
||||||
${if hostPlatform.isSunOS then
|
# Basic dependencies
|
||||||
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
|
[
|
||||||
# On Illumos/Solaris GNU as is preferred
|
"--with-gmp-include=${gmp.dev}/include"
|
||||||
" --with-gnu-as --without-gnu-ld "
|
"--with-gmp-lib=${gmp.out}/lib"
|
||||||
else ""}
|
"--with-mpfr-include=${mpfr.dev}/include"
|
||||||
--enable-lto
|
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
"--with-mpc=${libmpc}"
|
||||||
${if enableShared then "" else "--disable-shared"}
|
] ++
|
||||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
|
||||||
${if langJava then
|
# Basic configuration
|
||||||
"--with-ecj-jar=${javaEcj} " +
|
[
|
||||||
|
"--enable-lto"
|
||||||
|
"--disable-libstdcxx-pch"
|
||||||
|
"--without-included-gettext"
|
||||||
|
"--with-system-zlib"
|
||||||
|
"--enable-static"
|
||||||
|
"--enable-languages=${
|
||||||
|
concatStrings (intersperse ","
|
||||||
|
( optional langC "c"
|
||||||
|
++ optional langCC "c++"
|
||||||
|
++ optional langFortran "fortran"
|
||||||
|
++ optional langJava "java"
|
||||||
|
++ optional langAda "ada"
|
||||||
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
++ optional langObjC "objc"
|
||||||
|
++ optional langObjCpp "obj-c++"
|
||||||
|
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
] ++
|
||||||
|
|
||||||
|
(if enableMultilib
|
||||||
|
then ["--enable-multilib" "--disable-libquadmath"]
|
||||||
|
else ["--disable-multilib"]) ++
|
||||||
|
optional (!enableShared) "--disable-shared" ++
|
||||||
|
(if enablePlugin
|
||||||
|
then ["--enable-plugin"]
|
||||||
|
else ["--disable-plugin"]) ++
|
||||||
|
|
||||||
|
# Optional features
|
||||||
|
optional (isl != null) "--with-isl=${isl}" ++
|
||||||
|
|
||||||
|
# Java options
|
||||||
|
optionals langJava [
|
||||||
|
"--with-ecj-jar=${javaEcj}"
|
||||||
|
|
||||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
"--enable-java-home"
|
||||||
else ""}
|
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
] ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
--with-gmp-include=${gmp.dev}/include
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||||
--with-gmp-lib=${gmp.out}/lib
|
|
||||||
--with-mpfr-include=${mpfr.dev}/include
|
# Ada
|
||||||
--with-mpfr-lib=${mpfr.out}/lib
|
optional langAda "--enable-libada" ++
|
||||||
--with-mpc=${libmpc}
|
|
||||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
# Cross-compilation
|
||||||
--disable-libstdcxx-pch
|
optional (targetPlatform == hostPlatform) (
|
||||||
--without-included-gettext
|
let incDir = if hostPlatform.isDarwin
|
||||||
--with-system-zlib
|
then "${darwin.usr-include}"
|
||||||
--enable-static
|
else "${getDev stdenv.cc.libc}/include";
|
||||||
--enable-languages=${
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
concatStrings (intersperse ","
|
) ++
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
||||||
++ optional langFortran "fortran"
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
++ optional langJava "java"
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
# Platform-specific flags
|
||||||
++ optional langGo "go"
|
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||||
++ optional langObjC "objc"
|
optionals hostPlatform.isSunOS [
|
||||||
++ optional langObjCpp "obj-c++"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
# On Illumos/Solaris GNU as is preferred
|
||||||
)
|
"--with-gnu-as" "--without-gnu-ld"
|
||||||
)
|
]
|
||||||
}
|
;
|
||||||
${if targetPlatform == hostPlatform
|
|
||||||
then if hostPlatform.isDarwin
|
|
||||||
then " --with-native-system-header-dir=${darwin.usr-include}"
|
|
||||||
else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
|
|
||||||
else ""}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
|
||||||
";
|
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
@ -390,17 +395,13 @@ stdenv.mkDerivation ({
|
|||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = let
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
xgccArch = targetPlatform.gcc.arch or null;
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
xgccCpu = targetPlatform.gcc.cpu or null;
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
xgccAbi = targetPlatform.gcc.abi or null;
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
xgccFpu = targetPlatform.gcc.fpu or null;
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
xgccFloat = targetPlatform.gcc.float or null;
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
in {
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
@ -414,37 +415,39 @@ stdenv.mkDerivation ({
|
|||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
configureFlags =
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
optional (!enableMultilib) "--disable-multilib" ++
|
||||||
${if enableShared then "" else "--disable-shared"}
|
optional (!enableShared) "--disable-shared" ++
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
|
||||||
--with-gmp=${gmp.crossDrv}
|
[
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
"--with-gmp=${gmp.crossDrv}"
|
||||||
--with-mpc=${libmpc.crossDrv}
|
"--with-mpfr=${mpfr.crossDrv}"
|
||||||
--disable-libstdcxx-pch
|
"--with-mpc=${libmpc.crossDrv}"
|
||||||
--without-included-gettext
|
"--disable-libstdcxx-pch"
|
||||||
--with-system-zlib
|
"--without-included-gettext"
|
||||||
--enable-languages=${
|
"--with-system-zlib"
|
||||||
concatStrings (intersperse ","
|
"--enable-languages=${
|
||||||
( optional langC "c"
|
concatStrings (intersperse ","
|
||||||
++ optional langCC "c++"
|
( optional langC "c"
|
||||||
++ optional langFortran "fortran"
|
++ optional langCC "c++"
|
||||||
++ optional langJava "java"
|
++ optional langFortran "fortran"
|
||||||
++ optional langAda "ada"
|
++ optional langJava "java"
|
||||||
++ optional langVhdl "vhdl"
|
++ optional langAda "ada"
|
||||||
++ optional langGo "go"
|
++ optional langVhdl "vhdl"
|
||||||
|
++ optional langGo "go"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}"
|
||||||
}
|
] ++
|
||||||
${if langAda then " --enable-libada" else ""}
|
optional langAda "--enable-libada" ++
|
||||||
${xwithArch}
|
optional (xgccArch != null) "--with-arch=${xgccArch}" ++
|
||||||
${xwithCpu}
|
optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++
|
||||||
${xwithAbi}
|
optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++
|
||||||
${xwithFpu}
|
optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++
|
||||||
${xwithFloat}
|
optional (xgccFloat != null) "--with-float=${xgccFloat}"
|
||||||
'';
|
;
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,6 +23,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
|
# The tests try to do stuff with 127.0.0.1 and localhost
|
||||||
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||||
# describes an installation keeping the src.
|
# describes an installation keeping the src.
|
||||||
preUnpack = ''
|
preUnpack = ''
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python2
|
, python2
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -67,7 +67,7 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DLLVM_BUILD_TESTS=ON"
|
"-DLLVM_BUILD_TESTS=ON"
|
||||||
"-DLLVM_ENABLE_FFI=ON"
|
"-DLLVM_ENABLE_FFI=ON"
|
||||||
"-DLLVM_REQUIRES_RTTI=1"
|
"-DLLVM_REQUIRES_RTTI=1"
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||||
] ++ stdenv.lib.optional (!stdenv.isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
] ++ stdenv.lib.optional (!stdenv.isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python
|
, python
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -70,7 +70,7 @@ in stdenv.mkDerivation rec {
|
|||||||
] ++ stdenv.lib.optional enableSharedLibraries
|
] ++ stdenv.lib.optional enableSharedLibraries
|
||||||
"-DBUILD_SHARED_LIBS=ON"
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
++ stdenv.lib.optional (!isDarwin)
|
++ stdenv.lib.optional (!isDarwin)
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
++ stdenv.lib.optionals ( isDarwin) [
|
++ stdenv.lib.optionals ( isDarwin) [
|
||||||
"-DCMAKE_CXX_FLAGS=-stdlib=libc++"
|
"-DCMAKE_CXX_FLAGS=-stdlib=libc++"
|
||||||
"-DCAN_TARGET_i386=false"
|
"-DCAN_TARGET_i386=false"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python2
|
, python2
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -80,7 +80,7 @@ in stdenv.mkDerivation rec {
|
|||||||
] ++ stdenv.lib.optional enableSharedLibraries
|
] ++ stdenv.lib.optional enableSharedLibraries
|
||||||
"-DBUILD_SHARED_LIBS=ON"
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
++ stdenv.lib.optional (!isDarwin)
|
++ stdenv.lib.optional (!isDarwin)
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
++ stdenv.lib.optionals ( isDarwin) [
|
++ stdenv.lib.optionals ( isDarwin) [
|
||||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||||
"-DCAN_TARGET_i386=false"
|
"-DCAN_TARGET_i386=false"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python
|
, python
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -79,7 +79,7 @@ in stdenv.mkDerivation rec {
|
|||||||
] ++ stdenv.lib.optional enableSharedLibraries [
|
] ++ stdenv.lib.optional enableSharedLibraries [
|
||||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||||
] ++ stdenv.lib.optional (!isDarwin)
|
] ++ stdenv.lib.optional (!isDarwin)
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
++ stdenv.lib.optionals ( isDarwin) [
|
++ stdenv.lib.optionals ( isDarwin) [
|
||||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||||
"-DCAN_TARGET_i386=false"
|
"-DCAN_TARGET_i386=false"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python
|
, python
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -123,7 +123,7 @@ in stdenv.mkDerivation rec {
|
|||||||
] ++ stdenv.lib.optional enableSharedLibraries [
|
] ++ stdenv.lib.optional enableSharedLibraries [
|
||||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||||
] ++ stdenv.lib.optional (!isDarwin)
|
] ++ stdenv.lib.optional (!isDarwin)
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
++ stdenv.lib.optionals (isDarwin) [
|
++ stdenv.lib.optionals (isDarwin) [
|
||||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||||
"-DCAN_TARGET_i386=false"
|
"-DCAN_TARGET_i386=false"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python
|
, python
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -107,7 +107,7 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional (!isDarwin)
|
++ stdenv.lib.optional (!isDarwin)
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
++ stdenv.lib.optionals (isDarwin) [
|
++ stdenv.lib.optionals (isDarwin) [
|
||||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||||
"-DCAN_TARGET_i386=false"
|
"-DCAN_TARGET_i386=false"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python
|
, python
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -101,7 +101,7 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional (!isDarwin)
|
++ stdenv.lib.optional (!isDarwin)
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
++ stdenv.lib.optionals (isDarwin) [
|
++ stdenv.lib.optionals (isDarwin) [
|
||||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||||
"-DCAN_TARGET_i386=false"
|
"-DCAN_TARGET_i386=false"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, python
|
, python
|
||||||
, libffi
|
, libffi
|
||||||
, binutils
|
, libbfd
|
||||||
, libxml2
|
, libxml2
|
||||||
, valgrind
|
, valgrind
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cmakeFlags = with stdenv; [
|
cmakeFlags = with stdenv; [
|
||||||
"-DLLVM_ENABLE_FFI=ON"
|
"-DLLVM_ENABLE_FFI=ON"
|
||||||
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||||
] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
||||||
|
|
||||||
|
@ -70,6 +70,11 @@ rec {
|
|||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
"$out/bin/rustdoc"
|
"$out/bin/rustdoc"
|
||||||
''}
|
''}
|
||||||
|
${optionalString (stdenv.isDarwin && bootstrapping) ''
|
||||||
|
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo"
|
||||||
|
install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
||||||
|
install_name_tool -change /usr/lib/libz.1.dylib '${stdenv.lib.getLib zlib}/lib/libz.1.dylib' "$out/bin/cargo"
|
||||||
|
''}
|
||||||
|
|
||||||
${patchBootstrapCargo}
|
${patchBootstrapCargo}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
__impureHostDeps = [ "/usr/lib/libedit.3.dylib" ];
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
|
NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
|
||||||
|
|
||||||
@ -109,6 +109,14 @@ stdenv.mkDerivation {
|
|||||||
# Disable all lldb tests.
|
# Disable all lldb tests.
|
||||||
# error: Can't run LLDB test because LLDB's python path is not set
|
# error: Can't run LLDB test because LLDB's python path is not set
|
||||||
rm -vr src/test/debuginfo/*
|
rm -vr src/test/debuginfo/*
|
||||||
|
|
||||||
|
# Disable tests that fail when sandboxing is enabled.
|
||||||
|
substituteInPlace src/libstd/sys/unix/ext/net.rs \
|
||||||
|
--replace '#[test]' '#[test] #[ignore]'
|
||||||
|
substituteInPlace src/test/run-pass/env-home-dir.rs \
|
||||||
|
--replace 'home_dir().is_some()' true
|
||||||
|
rm -v src/test/run-pass/fds-are-cloexec.rs # FIXME: pipes?
|
||||||
|
rm -v src/test/run-pass/sync-send-in-std.rs # FIXME: ???
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{stdenv, fetchurl, libX11, xproto, indent, readline, gsl, freeglut, mesa, SDL
|
{stdenv, fetchurl, libX11, xproto, indent, readline, gsl, freeglut, mesa, SDL
|
||||||
, blas, binutils, intltool, gettext, zlib, libSM}:
|
, blas, libbfd, intltool, gettext, zlib, libSM}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
baseName = "lush";
|
baseName = "lush";
|
||||||
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libX11 libSM xproto indent readline gsl freeglut mesa SDL blas binutils
|
libX11 libSM xproto indent readline gsl freeglut mesa SDL blas libbfd
|
||||||
intltool gettext zlib
|
intltool gettext zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ let
|
|||||||
substituteInPlace dist/PathTools/Cwd.pm \
|
substituteInPlace dist/PathTools/Cwd.pm \
|
||||||
--replace "/bin/pwd" "$pwd"
|
--replace "/bin/pwd" "$pwd"
|
||||||
'';
|
'';
|
||||||
sandboxProfile = sandbox.allow "ipc-sysv-sem";
|
|
||||||
|
|
||||||
# Build a thread-safe Perl with a dynamic libperls.o. We need the
|
# Build a thread-safe Perl with a dynamic libperls.o. We need the
|
||||||
# "installstyle" option to ensure that modules are put under
|
# "installstyle" option to ensure that modules are put under
|
||||||
|
@ -54,8 +54,9 @@ stdenv.mkDerivation rec {
|
|||||||
# https://bugzilla.libsdl.org/show_bug.cgi?id=1431
|
# https://bugzilla.libsdl.org/show_bug.cgi?id=1431
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
|
|
||||||
# Flaky: fatal error: pointer-constraints-....h: No such file or directory
|
# /build/SDL2-2.0.7/src/video/wayland/SDL_waylandevents.c:41:10: fatal error:
|
||||||
#enableParallelBuilding = true;
|
# pointer-constraints-unstable-v1-client-protocol.h: No such file or directory
|
||||||
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
# XXX: By default, SDL wants to dlopen() PulseAudio, in which case
|
# XXX: By default, SDL wants to dlopen() PulseAudio, in which case
|
||||||
# we must arrange to add it to its RPATH; however, `patchelf' seems
|
# we must arrange to add it to its RPATH; however, `patchelf' seems
|
||||||
|
@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
|
|||||||
mv $out/share/gc $out/share/doc/gc
|
mv $out/share/gc $out/share/doc/gc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++";
|
description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++";
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "16k9awrhdsymx7dnmvqcnkaq8lz8x8zppy6sh7ls8prpd6mkkjlb";
|
sha256 = "16k9awrhdsymx7dnmvqcnkaq8lz8x8zppy6sh7ls8prpd6mkkjlb";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./czmq3-gcc7.patch ];
|
||||||
|
|
||||||
# Fix build on Glibc 2.24.
|
# Fix build on Glibc 2.24.
|
||||||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, zeromq }:
|
{ stdenv, fetchurl, fetchpatch, zeromq }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "4.0.2";
|
version = "4.0.2";
|
||||||
@ -9,6 +9,13 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "12gbh57xnz2v82x1g80gv4bwapmyzl00lbin5ix3swyac8i7m340";
|
sha256 = "12gbh57xnz2v82x1g80gv4bwapmyzl00lbin5ix3swyac8i7m340";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
url = https://patch-diff.githubusercontent.com/raw/zeromq/czmq/pull/1618.patch;
|
||||||
|
sha256 = "1dssy7k0fni6djail8rz0lk8p777158jvrqhgn500i636gkxaxhp";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
# Needs to be propagated for the .pc file to work
|
# Needs to be propagated for the .pc file to work
|
||||||
propagatedBuildInputs = [ zeromq ];
|
propagatedBuildInputs = [ zeromq ];
|
||||||
|
|
||||||
|
26
pkgs/development/libraries/czmq/czmq3-gcc7.patch
Normal file
26
pkgs/development/libraries/czmq/czmq3-gcc7.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/src/zgossip_engine.inc b/src/zgossip_engine.inc
|
||||||
|
index 37dbb4eb..727aaa9b 100644
|
||||||
|
--- a/src/zgossip_engine.inc
|
||||||
|
+++ b/src/zgossip_engine.inc
|
||||||
|
@@ -258,7 +258,7 @@ engine_set_log_prefix (client_t *client, const char *string)
|
||||||
|
{
|
||||||
|
if (client) {
|
||||||
|
s_client_t *self = (s_client_t *) client;
|
||||||
|
- snprintf (self->log_prefix, sizeof (self->log_prefix) - 1,
|
||||||
|
+ snprintf (self->log_prefix, sizeof (self->log_prefix),
|
||||||
|
"%6d:%-33s", self->unique_id, string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/zsys.c b/src/zsys.c
|
||||||
|
index 4d0bb8a1..f07db9c8 100644
|
||||||
|
--- a/src/zsys.c
|
||||||
|
+++ b/src/zsys.c
|
||||||
|
@@ -1071,7 +1071,7 @@ zsys_run_as (const char *lockfile, const char *group, const char *user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// We record the current process id in the lock file
|
||||||
|
- char pid_buffer [10];
|
||||||
|
+ char pid_buffer [32];
|
||||||
|
snprintf (pid_buffer, sizeof (pid_buffer), "%6d\n", getpid ());
|
||||||
|
if (write (handle, pid_buffer, strlen (pid_buffer)) != strlen (pid_buffer)) {
|
||||||
|
zsys_error ("cannot write to lockfile: %s", strerror (errno));
|
@ -91,6 +91,7 @@ stdenv.mkDerivation ({
|
|||||||
configureFlags =
|
configureFlags =
|
||||||
[ "-C"
|
[ "-C"
|
||||||
"--enable-add-ons"
|
"--enable-add-ons"
|
||||||
|
"--enable-obsolete-nsl"
|
||||||
"--enable-obsolete-rpc"
|
"--enable-obsolete-rpc"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--enable-stackguard-randomization"
|
"--enable-stackguard-randomization"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, gettext, perl
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, gettext, perl
|
||||||
, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, gobjectIntrospection
|
, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, gobjectIntrospection
|
||||||
, xorg, epoxy, json_glib, libxkbcommon, gmp
|
, xorg, epoxy, json_glib, libxkbcommon, gmp
|
||||||
, waylandSupport ? stdenv.isLinux, wayland, wayland-protocols
|
, waylandSupport ? stdenv.isLinux, wayland, wayland-protocols
|
||||||
@ -13,7 +13,7 @@ with stdenv.lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
ver_maj = "3.22";
|
ver_maj = "3.22";
|
||||||
ver_min = "24";
|
ver_min = "26";
|
||||||
version = "${ver_maj}.${ver_min}";
|
version = "${ver_maj}.${ver_min}";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz";
|
url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz";
|
||||||
sha256 = "cbb16e4cfc928ab8f5f22f7290616f95f6ebc8c97cc724a2007b07ced833592b";
|
sha256 = "61eef0d320e541976e2dfe445729f12b5ade53050ee9de6184235cb60cd4b967";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
@ -29,7 +29,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
|
nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
|
||||||
|
|
||||||
patches = [ ./3.0-immodules.cache.patch ];
|
patches = [
|
||||||
|
./3.0-immodules.cache.patch
|
||||||
|
(fetchpatch {
|
||||||
|
name = "Xft-setting-fallback-compute-DPI-properly.patch";
|
||||||
|
url = "https://bug757142.bugzilla-attachments.gnome.org/attachment.cgi?id=344123";
|
||||||
|
sha256 = "0g6fhqcv8spfy3mfmxpyji93k8d4p4q4fz1v9a1c1cgcwkz41d7p";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ libxkbcommon epoxy json_glib ];
|
buildInputs = [ libxkbcommon epoxy json_glib ];
|
||||||
propagatedBuildInputs = with xorg; with stdenv.lib;
|
propagatedBuildInputs = with xorg; with stdenv.lib;
|
||||||
|
47
pkgs/development/libraries/libbfd/default.nix
Normal file
47
pkgs/development/libraries/libbfd/default.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{ stdenv
|
||||||
|
, fetchurl, autoreconfHook264, bison, binutils-raw
|
||||||
|
, libiberty, zlib
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "libbfd-${version}";
|
||||||
|
inherit (binutils-raw) version src;
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
patches = binutils-raw.patches ++ [
|
||||||
|
../../tools/misc/binutils/build-components-separately.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
# We just want to build libbfd
|
||||||
|
postPatch = ''
|
||||||
|
cd bfd
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ autoreconfHook264 bison ];
|
||||||
|
buildInputs = [ libiberty zlib ];
|
||||||
|
|
||||||
|
configurePlatforms = [ "build" "host" ];
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-targets=all" "--enable-64-bit-bfd"
|
||||||
|
"--enable-install-libbfd"
|
||||||
|
"--enable-shared"
|
||||||
|
"--with-system-zlib"
|
||||||
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A library for manipulating containers of machine code";
|
||||||
|
longDescription = ''
|
||||||
|
BFD is a library which provides a single interface to read and write
|
||||||
|
object files, executables, archive files, and core files in any format.
|
||||||
|
It is associated with GNU Binutils, and elsewhere often distributed with
|
||||||
|
it.
|
||||||
|
'';
|
||||||
|
homepage = http://www.gnu.org/software/binutils/;
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [ ericson2314 ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
@ -1,15 +1,18 @@
|
|||||||
{ stdenv, lib, fetchurl, gcc, staticBuild ? false }:
|
{ stdenv, fetchurl, gcc, staticBuild ? false }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libiberty-${gcc.cc.version}";
|
name = "libiberty-${gcc.cc.version}";
|
||||||
|
|
||||||
inherit (gcc.cc) src;
|
inherit (gcc.cc) src;
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
|
postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
|
||||||
|
|
||||||
configureFlags = [ "--enable-install-libiberty" ] ++ lib.optional (!staticBuild) "--enable-shared";
|
configureFlags = [ "--enable-install-libiberty" ]
|
||||||
|
++ stdenv.lib.optional (!staticBuild) "--enable-shared";
|
||||||
|
|
||||||
postInstall = lib.optionalString (!staticBuild) ''
|
postInstall = stdenv.lib.optionalString (!staticBuild) ''
|
||||||
cp pic/libiberty.a $out/lib*/libiberty.a
|
cp pic/libiberty.a $out/lib*/libiberty.a
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -17,7 +20,7 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = http://gcc.gnu.org/;
|
homepage = http://gcc.gnu.org/;
|
||||||
license = licenses.lgpl2;
|
license = licenses.lgpl2;
|
||||||
description = "Collection of subroutines used by various GNU programs";
|
description = "Collection of subroutines used by various GNU programs";
|
||||||
maintainers = with maintainers; [ abbradar ];
|
maintainers = with maintainers; [ abbradar ericson2314 ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
43
pkgs/development/libraries/libopcodes/default.nix
Normal file
43
pkgs/development/libraries/libopcodes/default.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{ stdenv, buildPackages
|
||||||
|
, fetchurl, autoreconfHook264, bison, binutils-raw
|
||||||
|
, libiberty, libbfd
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "libopcodes-${version}";
|
||||||
|
inherit (binutils-raw) version src;
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
patches = binutils-raw.patches ++ [
|
||||||
|
../../tools/misc/binutils/build-components-separately.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
# We just want to build libopcodes
|
||||||
|
postPatch = ''
|
||||||
|
cd opcodes
|
||||||
|
find . ../include/opcode -type f -exec sed {} -i -e 's/"bfd.h"/<bfd.h>/' \;
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ autoreconfHook264 bison buildPackages.stdenv.cc ];
|
||||||
|
buildInputs = [ libiberty ];
|
||||||
|
# dis-asm.h includes bfd.h
|
||||||
|
propagatedBuildInputs = [ libbfd ];
|
||||||
|
|
||||||
|
configurePlatforms = [ "build" "host" ];
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-targets=all" "--enable-64-bit-bfd"
|
||||||
|
"--enable-install-libbfd"
|
||||||
|
"--enable-shared"
|
||||||
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A library from binutils for manipulating machine code";
|
||||||
|
homepage = http://www.gnu.org/software/binutils/;
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [ ericson2314 ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit }:
|
{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libusb-1.0.20";
|
name = "libusb-1.0.21";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/libusb/${name}.tar.bz2";
|
url = "mirror://sourceforge/libusb/${name}.tar.bz2";
|
||||||
sha256 = "1zzp6hc7r7m3gl6zjbmzn92zkih4664cckaf49l1g5hapa8721fb";
|
sha256 = "0jw2n5kdnrqvp7zh792fd6mypzzfap6jp4gfcmq4n6c1kb79rkkx";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
|
outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
, ApplicationServices, CoreServices }:
|
, ApplicationServices, CoreServices }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.15.0";
|
version = "1.16.1";
|
||||||
name = "libuv-${version}";
|
name = "libuv-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "libuv";
|
owner = "libuv";
|
||||||
repo = "libuv";
|
repo = "libuv";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "092hxqjvbb6d03h3msc38359w2kixba1ansyrsbyqq8iqiqwnkw0";
|
sha256 = "06p3xy276spqbr9xzbs7qlpdk34qsn87s2qmp6xn4j7v3bnqja7z";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = let
|
postPatch = let
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, binutils }:
|
{ stdenv, fetchurl, libopcodes }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -11,8 +11,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz";
|
sha256 = "19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Needs libopcodes.so from binutils for 'make check'
|
buildInputs = stdenv.lib.optional doCheck libopcodes;
|
||||||
buildInputs = [ binutils ];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ perl pkgconfig which ];
|
nativeBuildInputs = [ perl pkgconfig which ];
|
||||||
|
|
||||||
enableParallelBuilding = false;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE =
|
NIX_CFLAGS_COMPILE =
|
||||||
optionalString stdenv.isLinux "-std=gnu++98" # gnu++ in (Obj)C flags is no good on Darwin
|
optionalString stdenv.isLinux "-std=gnu++98" # gnu++ in (Obj)C flags is no good on Darwin
|
||||||
|
@ -100,6 +100,10 @@ stdenv.mkDerivation {
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# 1. /buildATLAS/build/bin/ATLrun.sh: multiple segfaults.
|
||||||
|
# 2. "atlas does its own parallel builds"
|
||||||
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://math-atlas.sourceforge.net/;
|
homepage = http://math-atlas.sourceforge.net/;
|
||||||
description = "Automatically Tuned Linear Algebra Software (ATLAS)";
|
description = "Automatically Tuned Linear Algebra Software (ATLAS)";
|
||||||
|
@ -8,11 +8,11 @@ assert expat != null;
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "wayland-${version}";
|
name = "wayland-${version}";
|
||||||
version = "1.12.0";
|
version = "1.14.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
|
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
|
||||||
sha256 = "d6b4135cba0188abcb7275513c72dede751d6194f6edc5b82183a3ba8b821ab1";
|
sha256 = "1f3sla6h0bw15fz8pjc67jhwj7pwmfdc7qlj42j5k9v116ycm07d";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags = [ "--with-scanner" "--disable-documentation" ];
|
configureFlags = [ "--with-scanner" "--disable-documentation" ];
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "wayland-protocols-${version}";
|
name = "wayland-protocols-${version}";
|
||||||
version = "1.10";
|
version = "1.11";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
|
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
|
||||||
sha256 = "5719c51d7354864983171c5083e93a72ac99229e2b460c4bb10513de08839c0a";
|
sha256 = "0138psvx6fv8z5x2p6xi4iij6m5k62c0qyfsb45xgcf5a4fyxz1s";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -17,6 +17,20 @@ if isPyPy then null else buildPythonPackage rec {
|
|||||||
propagatedBuildInputs = [ libffi pycparser ];
|
propagatedBuildInputs = [ libffi pycparser ];
|
||||||
buildInputs = [ pytest ];
|
buildInputs = [ pytest ];
|
||||||
|
|
||||||
|
# On Darwin, the cffi tests want to hit libm a lot, and look for it in a global
|
||||||
|
# impure search path. It's obnoxious how much repetition there is, and how difficult
|
||||||
|
# it is to get it to search somewhere else (since we do actually have a libm symlink in libSystem)
|
||||||
|
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace testing/cffi0/test_parsing.py \
|
||||||
|
--replace 'lib_m = "m"' 'lib_m = "System"' \
|
||||||
|
--replace '"libm" in name' '"libSystem" in name'
|
||||||
|
substituteInPlace testing/cffi0/test_unicode_literals.py --replace 'lib_m = "m"' 'lib_m = "System"'
|
||||||
|
substituteInPlace testing/cffi0/test_zdistutils.py --replace 'self.lib_m = "m"' 'self.lib_m = "System"'
|
||||||
|
substituteInPlace testing/cffi1/test_recompiler.py --replace 'lib_m = "m"' 'lib_m = "System"'
|
||||||
|
substituteInPlace testing/cffi0/test_function.py --replace "lib_m = 'm'" "lib_m = 'System'"
|
||||||
|
substituteInPlace testing/cffi0/test_verify.py --replace "lib_m = ['m']" "lib_m = ['System']"
|
||||||
|
'';
|
||||||
|
|
||||||
# The tests use -Werror but with python3.6 clang detects some unreachable code.
|
# The tests use -Werror but with python3.6 clang detects some unreachable code.
|
||||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ];
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ];
|
||||||
|
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
{ lib, buildPythonPackage, isPyPy, isPy3k, fetchurl, gdb, binutils }:
|
{ lib, fetchFromGitHub, buildPythonPackage, isPyPy, isPy3k, libbfd, libopcodes }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
name = "pybfd-0.1.1";
|
name = "pybfd-0.1.1";
|
||||||
|
|
||||||
disabled = isPyPy || isPy3k;
|
disabled = isPyPy || isPy3k;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "mirror://pypi/p/pybfd/${name}.tar.gz";
|
owner = "orivej";
|
||||||
sha256 = "d99b32ad077e704ddddc0b488c83cae851c14919e5cbc51715d00464a1932df4";
|
repo = "pybfd";
|
||||||
|
rev = "a2c3a7b94a3c9f7a353b863f69a79174c6a41ebe";
|
||||||
|
sha256 = "0wrz234dz25hs0ajzcz5w8lzc1yzf64wqa8fj01hhr4yy23vjkcr";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
LIBBFD_INCLUDE_DIR = "${libbfd.dev}/include";
|
||||||
substituteInPlace setup.py \
|
LIBBFD_LIBRARY = "${libbfd}/lib/libbfd.so";
|
||||||
--replace '"/usr/include"' '"${gdb}/include"' \
|
LIBOPCODES_INCLUDE_DIR = "${libopcodes.dev}/include";
|
||||||
--replace '"/usr/lib"' '"${binutils.lib}/lib"'
|
LIBOPCODES_LIBRARY = "${libopcodes}/lib/libopcodes.so";
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://github.com/Groundworkstech/pybfd;
|
homepage = https://github.com/Groundworkstech/pybfd;
|
||||||
description = "A Python interface to the GNU Binary File Descriptor (BFD) library";
|
description = "A Python interface to the GNU Binary File Descriptor (BFD) library";
|
||||||
license = lib.licenses.gpl2;
|
license = lib.licenses.gpl2;
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
|
maintainers = with lib.maintainers; [ orivej ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, setuptools_scm
|
, setuptools_scm
|
||||||
}:
|
}:
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
version = "3.2.3";
|
version = "3.2.5";
|
||||||
pname = "pytest";
|
pname = "pytest";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "27fa6617efc2869d3e969a3e75ec060375bfb28831ade8b5cdd68da3a741dc3c";
|
sha256 = "6d5bd4f7113b444c55a3bbb5c738a3dd80d43563d063fc42dcb0aaefbdd78b81";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ hypothesis setuptools_scm ];
|
buildInputs = [ hypothesis setuptools_scm ];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{stdenv, fetchFromGitHub, cmake, pkgconfig, zlib, curl, elfutils, python, libiberty, binutils}:
|
{stdenv, fetchFromGitHub, cmake, pkgconfig, zlib, curl, elfutils, python, libiberty, libopcodes}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "kcov-${version}";
|
name = "kcov-${version}";
|
||||||
@ -12,8 +12,9 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = "patchShebangs src/bin-to-c-source.py";
|
preConfigure = "patchShebangs src/bin-to-c-source.py";
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
buildInputs = [ cmake zlib curl elfutils python libiberty binutils ];
|
|
||||||
|
buildInputs = [ zlib curl elfutils python libiberty libopcodes ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -1,29 +1,28 @@
|
|||||||
{ stdenv, fetchurl, python, asciidoc, re2c }:
|
{ stdenv, fetchFromGitHub, python, asciidoc, re2c }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ninja-${version}";
|
name = "ninja-${version}";
|
||||||
version = "1.7.2";
|
version = "1.8.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
name = "${name}.tar.gz";
|
owner = "ninja-build";
|
||||||
url = "https://github.com/ninja-build/ninja/archive/v${version}.tar.gz";
|
repo = "ninja";
|
||||||
sha256 = "1n8n3g26ppwh7zwrc37n3alkbpbj0wki34ih53s3rkhs8ajs1p9f";
|
rev = "v${version}";
|
||||||
|
sha256 = "16scq9hcq6c5ap6sy8j4qi75qps1zvrf3p79j1vbrvnqzp928i5f";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ python asciidoc re2c ];
|
nativeBuildInputs = [ python asciidoc re2c ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
python bootstrap.py
|
python configure.py --bootstrap
|
||||||
asciidoc doc/manual.asciidoc
|
asciidoc doc/manual.asciidoc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
install -Dm555 -t $out/bin ninja
|
||||||
cp ninja $out/bin/
|
install -Dm444 -t $out/share/doc/ninja doc/manual.asciidoc doc/manual.html
|
||||||
|
install -Dm444 misc/bash-completion $out/share/bash-completion/completions/ninja
|
||||||
mkdir -p $out/share/doc/ninja
|
install -Dm444 misc/zsh-completion $out/share/zsh/site-functions/_ninja
|
||||||
cp doc/manual.asciidoc $out/share/doc/ninja/
|
|
||||||
cp doc/manual.html $out/share/doc/ninja/
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
@ -36,9 +35,9 @@ stdenv.mkDerivation rec {
|
|||||||
input files generated by a higher-level build system, and it is designed
|
input files generated by a higher-level build system, and it is designed
|
||||||
to run builds as fast as possible.
|
to run builds as fast as possible.
|
||||||
'';
|
'';
|
||||||
homepage = http://martine.github.io/ninja/;
|
homepage = https://ninja-build.org/;
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.thoughtpolice maintainers.bjornfor ];
|
maintainers = with maintainers; [ thoughtpolice bjornfor orivej ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
mv man "$out/share"
|
mv man "$out/share"
|
||||||
mv bin "$out"
|
mv bin "$out"
|
||||||
for p in $out/bin/*; do
|
for p in $out/bin/*; do
|
||||||
wrapProgram "$p" --set PATH '$PATH:'"$out/bin"
|
wrapProgram "$p" --suffix PATH : "$out/bin"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -0,0 +1,178 @@
|
|||||||
|
From bc09a9236f67e710d545ac11bcdac7b55dbcc1a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Ericson <John.Ericson@Obsidian.Systems>
|
||||||
|
Date: Thu, 12 Oct 2017 11:16:57 -0400
|
||||||
|
Subject: [PATCH] Build components separately
|
||||||
|
|
||||||
|
---
|
||||||
|
bfd/configure.ac | 18 +++---------------
|
||||||
|
opcodes/Makefile.am | 17 +++++++++++++----
|
||||||
|
opcodes/configure.ac | 45 ++++++---------------------------------------
|
||||||
|
3 files changed, 22 insertions(+), 58 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bfd/configure.ac b/bfd/configure.ac
|
||||||
|
index 9a183c1628..8728837384 100644
|
||||||
|
--- a/bfd/configure.ac
|
||||||
|
+++ b/bfd/configure.ac
|
||||||
|
@@ -241,31 +241,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
|
||||||
|
|
||||||
|
LT_LIB_M
|
||||||
|
|
||||||
|
-# When building a shared libbfd, link against the pic version of libiberty
|
||||||
|
-# so that apps that use libbfd won't need libiberty just to satisfy any
|
||||||
|
-# libbfd references.
|
||||||
|
-# We can't do that if a pic libiberty is unavailable since including non-pic
|
||||||
|
-# code would insert text relocations into libbfd.
|
||||||
|
SHARED_LIBADD=
|
||||||
|
-SHARED_LDFLAGS=
|
||||||
|
+SHARED_LDFLAGS=-liberty
|
||||||
|
if test "$enable_shared" = "yes"; then
|
||||||
|
-changequote(,)dnl
|
||||||
|
- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
|
||||||
|
-changequote([,])dnl
|
||||||
|
- if test -n "$x"; then
|
||||||
|
- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
# More hacks to build DLLs on Windows.
|
||||||
|
case "${host}" in
|
||||||
|
*-*-cygwin*)
|
||||||
|
SHARED_LDFLAGS="-no-undefined"
|
||||||
|
- SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
|
||||||
|
+ SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32"
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Hack to build or1k-src on OSX
|
||||||
|
or1k*-*-darwin*)
|
||||||
|
- SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
|
||||||
|
+ SHARED_LIBADD="-liberty -lintl"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
|
||||||
|
index 925e7ff651..47b395c195 100644
|
||||||
|
--- a/opcodes/Makefile.am
|
||||||
|
+++ b/opcodes/Makefile.am
|
||||||
|
@@ -52,7 +52,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# This is where bfd.h lives.
|
||||||
|
-BFD_H = ../bfd/bfd.h
|
||||||
|
+BFD_H = $(BFDDIR)/bfd.h
|
||||||
|
|
||||||
|
BUILD_LIBS = @BUILD_LIBS@
|
||||||
|
BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
|
||||||
|
@@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@
|
||||||
|
# development.sh is used to determine -Werror default.
|
||||||
|
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
|
||||||
|
|
||||||
|
-AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
|
||||||
|
+AM_CPPFLAGS = -I. -I$(srcdir) -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
|
||||||
|
|
||||||
|
disassemble.lo: disassemble.c
|
||||||
|
if am__fastdepCC
|
||||||
|
@@ -324,12 +324,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
|
||||||
|
# old version of libbfd, or to pick up libbfd for the wrong architecture
|
||||||
|
# if host != build. So for building with shared libraries we use a
|
||||||
|
# hardcoded path to libbfd.so instead of relying on the entries in libbfd.la.
|
||||||
|
-libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
|
||||||
|
+libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion
|
||||||
|
libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
|
||||||
|
-libopcodes_la_LDFLAGS += -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@
|
||||||
|
+libopcodes_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@
|
||||||
|
# Allow dependency tracking to work on all the source files.
|
||||||
|
EXTRA_libopcodes_la_SOURCES = $(LIBOPCODES_CFILES)
|
||||||
|
|
||||||
|
+libtool-soversion:
|
||||||
|
+ @echo "creating $@"
|
||||||
|
+ bfd_soversion="$(VERSION)" ;\
|
||||||
|
+ . $(BFDDIR)/development.sh ;\
|
||||||
|
+ if test "$$development" = true ; then \
|
||||||
|
+ bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
|
||||||
|
+ fi ;\
|
||||||
|
+ echo "$${bfd_soversion}" > $@
|
||||||
|
+
|
||||||
|
# libtool will build .libs/libopcodes.a. We create libopcodes.a in
|
||||||
|
# the build directory so that we don't have to convert all the
|
||||||
|
# programs that use libopcodes.a simultaneously. This is a hack which
|
||||||
|
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
|
||||||
|
index b9f5eb8a4f..ef2c2152b7 100644
|
||||||
|
--- a/opcodes/configure.ac
|
||||||
|
+++ b/opcodes/configure.ac
|
||||||
|
@@ -89,6 +89,7 @@ AC_PROG_INSTALL
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h)
|
||||||
|
ACX_HEADER_STRING
|
||||||
|
+GCC_HEADER_STDINT(bfd_stdint.h)
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([basename, stpcpy])
|
||||||
|
|
||||||
|
@@ -134,61 +135,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
|
||||||
|
|
||||||
|
LT_LIB_M
|
||||||
|
|
||||||
|
-#Libs for generator progs
|
||||||
|
-if test "x$cross_compiling" = "xno"; then
|
||||||
|
- BUILD_LIBS=../libiberty/libiberty.a
|
||||||
|
- BUILD_LIB_DEPS=$BUILD_LIBS
|
||||||
|
-else
|
||||||
|
- # if cross-compiling, assume that the system provides -liberty
|
||||||
|
- # and that the version is compatible with new headers.
|
||||||
|
- BUILD_LIBS=-liberty
|
||||||
|
- BUILD_LIB_DEPS=
|
||||||
|
-fi
|
||||||
|
-BUILD_LIBS="$BUILD_LIBS $LIBINTL"
|
||||||
|
-BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP"
|
||||||
|
+BUILD_LIBS="-liberty $LIBINTL"
|
||||||
|
+BUILD_LIB_DEPS="$LIBINTL_DEP"
|
||||||
|
|
||||||
|
AC_SUBST(BUILD_LIBS)
|
||||||
|
AC_SUBST(BUILD_LIB_DEPS)
|
||||||
|
|
||||||
|
# Horrible hacks to build DLLs on Windows and a shared library elsewhere.
|
||||||
|
SHARED_LDFLAGS=
|
||||||
|
-SHARED_LIBADD=
|
||||||
|
+SHARED_LIBADD=-liberty
|
||||||
|
SHARED_DEPENDENCIES=
|
||||||
|
if test "$enable_shared" = "yes"; then
|
||||||
|
-# When building a shared libopcodes, link against the pic version of libiberty
|
||||||
|
-# so that apps that use libopcodes won't need libiberty just to satisfy any
|
||||||
|
-# libopcodes references.
|
||||||
|
-# We can't do that if a pic libiberty is unavailable since including non-pic
|
||||||
|
-# code would insert text relocations into libopcodes.
|
||||||
|
# Note that linking against libbfd as we do here, which is itself linked
|
||||||
|
# against libiberty, may not satisfy all the libopcodes libiberty references
|
||||||
|
# since libbfd may not pull in the entirety of libiberty.
|
||||||
|
-changequote(,)dnl
|
||||||
|
- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
|
||||||
|
-changequote([,])dnl
|
||||||
|
- if test -n "$x"; then
|
||||||
|
- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
case "${host}" in
|
||||||
|
*-*-cygwin*)
|
||||||
|
SHARED_LDFLAGS="-no-undefined"
|
||||||
|
- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
|
||||||
|
+ SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin"
|
||||||
|
;;
|
||||||
|
- *-*-darwin*)
|
||||||
|
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
|
||||||
|
- SHARED_DEPENDENCIES="../bfd/libbfd.la"
|
||||||
|
- ;;
|
||||||
|
*)
|
||||||
|
- case "$host_vendor" in
|
||||||
|
- hp)
|
||||||
|
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
|
||||||
|
- ;;
|
||||||
|
- *)
|
||||||
|
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
|
||||||
|
- ;;
|
||||||
|
- esac
|
||||||
|
- SHARED_DEPENDENCIES="../bfd/libbfd.la"
|
||||||
|
+ SHARED_LIBADD="-lbfd ${SHARED_LIBADD}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.2
|
||||||
|
|
@ -48,15 +48,16 @@ stdenv.mkDerivation rec {
|
|||||||
# there) and causes a cycle between the lib and bin outputs, so
|
# there) and causes a cycle between the lib and bin outputs, so
|
||||||
# get rid of it.
|
# get rid of it.
|
||||||
./no-plugins.patch
|
./no-plugins.patch
|
||||||
|
|
||||||
|
# Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and
|
||||||
|
# elf32-littlearm-vxworks in favor of the first.
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766
|
||||||
|
./disambiguate-arm-targets.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [ "out" ]
|
outputs = [ "out" "info" ];
|
||||||
++ optional (targetPlatform == hostPlatform && !hostPlatform.isDarwin) "lib" # problems in Darwin stdenv
|
|
||||||
++ [ "info" ]
|
|
||||||
++ optional (targetPlatform == hostPlatform) "dev";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ bison ]
|
nativeBuildInputs = [ bison buildPackages.stdenv.cc ];
|
||||||
++ optional (hostPlatform != buildPlatform) buildPackages.stdenv.cc;
|
|
||||||
buildInputs = [ zlib ];
|
buildInputs = [ zlib ];
|
||||||
|
|
||||||
inherit noSysDirs;
|
inherit noSysDirs;
|
||||||
@ -87,16 +88,21 @@ stdenv.mkDerivation rec {
|
|||||||
then []
|
then []
|
||||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags =
|
configureFlags = [
|
||||||
[ "--enable-shared" "--enable-deterministic-archives" "--disable-werror" ]
|
"--enable-targets=all" "--enable-64-bit-bfd"
|
||||||
++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop"
|
"--disable-install-libbfd"
|
||||||
++ optionals gold [ "--enable-gold" "--enable-plugins" ]
|
"--disable-shared" "--enable-static"
|
||||||
++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu";
|
"--with-system-zlib"
|
||||||
|
|
||||||
|
"--enable-deterministic-archives"
|
||||||
|
"--disable-werror"
|
||||||
|
"--enable-fix-loongson2f-nop"
|
||||||
|
] ++ optionals gold [ "--enable-gold" "--enable-plugins" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit prefix;
|
inherit prefix version;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -109,6 +115,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
homepage = http://www.gnu.org/software/binutils/;
|
homepage = http://www.gnu.org/software/binutils/;
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [ ericson2314 ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
||||||
/* Give binutils a lower priority than gcc-wrapper to prevent a
|
/* Give binutils a lower priority than gcc-wrapper to prevent a
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
|
||||||
|
index 9f956d3..f5b61f1 100644
|
||||||
|
--- a/bfd/elf32-arm.c
|
||||||
|
+++ b/bfd/elf32-arm.c
|
||||||
|
@@ -19585,7 +19585,10 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
|
||||||
|
#undef ELF_MAXPAGESIZE
|
||||||
|
#define ELF_MAXPAGESIZE 0x1000
|
||||||
|
|
||||||
|
+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-vxworks (priority 2) */
|
||||||
|
+#define elf_match_priority 2
|
||||||
|
#include "elf32-target.h"
|
||||||
|
+#undef elf_match_priority
|
||||||
|
|
||||||
|
|
||||||
|
/* Merge backend specific data from an object file to the output
|
||||||
|
@@ -19974,4 +19977,7 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt,
|
||||||
|
#undef ELF_MAXPAGESIZE
|
||||||
|
#define ELF_MAXPAGESIZE 0x8000
|
||||||
|
|
||||||
|
+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-symbian (priority 2) */
|
||||||
|
+#define elf_match_priority 2
|
||||||
|
#include "elf32-target.h"
|
||||||
|
+#undef elf_match_priority
|
@ -1,18 +1,19 @@
|
|||||||
{ fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo, zlib
|
{ stdenv
|
||||||
, dejagnu, perl, pkgconfig
|
|
||||||
|
# Build time
|
||||||
|
, fetchurl, pkgconfig, perl, texinfo, setupDebugInfoDirs
|
||||||
|
|
||||||
|
# Run time
|
||||||
|
, ncurses, readline, gmp, mpfr, expat, zlib, dejagnu
|
||||||
|
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, buildPlatform, hostPlatform, targetPlatform
|
||||||
|
|
||||||
, pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null
|
, pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null
|
||||||
, guile ? null
|
, guile ? null
|
||||||
|
|
||||||
# Support all known targets in one gdb binary.
|
|
||||||
, multitarget ? false
|
|
||||||
|
|
||||||
# Additional dependencies for GNU/Hurd.
|
# Additional dependencies for GNU/Hurd.
|
||||||
, mig ? null, hurd ? null
|
, mig ? null, hurd ? null
|
||||||
|
|
||||||
, setupDebugInfoDirs
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -58,10 +59,16 @@ stdenv.mkDerivation rec {
|
|||||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||||
|
|
||||||
configureFlags = with stdenv.lib; [
|
configureFlags = with stdenv.lib; [
|
||||||
"--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
|
"--enable-targets=all" "--enable-64-bit-bfd"
|
||||||
"--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
|
"--disable-install-libbfd"
|
||||||
] ++ stdenv.lib.optional (!pythonSupport) "--without-python"
|
"--disable-shared" "--enable-static"
|
||||||
++ stdenv.lib.optional multitarget "--enable-targets=all";
|
"--with-system-zlib"
|
||||||
|
"--with-system-readline"
|
||||||
|
|
||||||
|
"--with-gmp=${gmp.dev}"
|
||||||
|
"--with-mpfr=${mpfr.dev}"
|
||||||
|
"--with-expat" "--with-libexpat-prefix=${expat.dev}"
|
||||||
|
] ++ stdenv.lib.optional (!pythonSupport) "--without-python";
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
'' # Remove Info files already provided by Binutils and other packages.
|
'' # Remove Info files already provided by Binutils and other packages.
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
{ stdenv, fetchurl, autoconf, libelf, libiberty, gfortran, zlib, binutils }:
|
{ stdenv
|
||||||
|
, fetchurl, autoconf, gfortran
|
||||||
|
, libelf, libiberty, zlib, libbfd, libopcodes
|
||||||
|
, buildPackages
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.0.6";
|
version = "1.0.6";
|
||||||
@ -9,12 +13,15 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "06q5y9qmdn1h0wjmy28z6gwswskmph49j7simfqcqwv05gvd9svr";
|
sha256 = "06q5y9qmdn1h0wjmy28z6gwswskmph49j7simfqcqwv05gvd9svr";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Goes past the rpl_malloc linking failure
|
# Goes past the rpl_malloc linking failure; fixes silent file breakage
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export ac_cv_func_malloc_0_nonnull=yes
|
export ac_cv_func_malloc_0_nonnull=yes
|
||||||
|
substituteInPlace ./configure \
|
||||||
|
--replace "/usr/bin/file" "${buildPackages.file}/bin/file"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ autoconf libelf libiberty gfortran zlib binutils ];
|
nativeBuildInputs = [ autoconf gfortran ];
|
||||||
|
buildInputs = [ libelf libiberty zlib libbfd libopcodes ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Tool that aims at generating automatically execution trace from HPC programs";
|
description = "Tool that aims at generating automatically execution trace from HPC programs";
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders, coreutils
|
{ stdenv, buildPackages
|
||||||
, libiberty_static, withGUI ? false , qt4 ? null}:
|
, fetchurl, pkgconfig
|
||||||
|
, libbfd, popt, zlib, linuxHeaders, libiberty_static
|
||||||
|
, withGUI ? false, qt4 ? null
|
||||||
|
}:
|
||||||
|
|
||||||
# libX11 is needed because the Qt build stuff automatically adds `-lX11'.
|
# libX11 is needed because the Qt build stuff automatically adds `-lX11'.
|
||||||
assert withGUI -> qt4 != null;
|
assert withGUI -> qt4 != null;
|
||||||
@ -14,12 +17,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace opjitconv/opjitconv.c \
|
substituteInPlace opjitconv/opjitconv.c \
|
||||||
--replace "/bin/rm" "${coreutils}/bin/rm" \
|
--replace "/bin/rm" "${buildPackages.coreutils}/bin/rm" \
|
||||||
--replace "/bin/cp" "${coreutils}/bin/cp"
|
--replace "/bin/cp" "${buildPackages.coreutils}/bin/cp"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ binutils zlib popt linuxHeaders libiberty_static ]
|
buildInputs = [ libbfd zlib popt linuxHeaders libiberty_static ]
|
||||||
++ stdenv.lib.optionals withGUI [ qt4 ];
|
++ stdenv.lib.optionals withGUI [ qt4 ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ fetchurl, stdenv, binutils
|
{ stdenv
|
||||||
, pkgconfig, gtk2, glib, pango, libglade }:
|
, fetchurl, pkgconfig
|
||||||
|
, gtk2, glib, pango, libglade
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "sysprof-1.2.0";
|
name = "sysprof-1.2.0";
|
||||||
@ -10,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ binutils gtk2 glib pango libglade ];
|
buildInputs = [ gtk2 glib pango libglade ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://sysprof.com/;
|
homepage = http://sysprof.com/;
|
||||||
|
@ -5,7 +5,7 @@ let
|
|||||||
in
|
in
|
||||||
buildNodejs {
|
buildNodejs {
|
||||||
inherit enableNpm;
|
inherit enableNpm;
|
||||||
version = "9.0.0";
|
version = "9.2.0";
|
||||||
sha256 = "19az7mxcb3d1aj0f7gvhriyyghn1rwn0425924pa84d6j1mbsljv";
|
sha256 = "1hmvwfbavk2axqz9kin8b5zsld25gznhvlz55h3yl6nwx9iz5jk4";
|
||||||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ];
|
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ];
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,18 @@ in stdenv.mkDerivation rec {
|
|||||||
pkgconfig intltool fontconfig libzip zip zlib
|
pkgconfig intltool fontconfig libzip zip zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
# Build fails on Linux with windres.
|
||||||
|
export ac_cv_prog_ac_ct_WINDRES=
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p "$out/share/"
|
mkdir -p "$out/share/"
|
||||||
ln -s ${freedink_data}/share/dink "$out/share/"
|
ln -s ${freedink_data}/share/dink "$out/share/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A free, portable and enhanced version of the Dink Smallwood game engine";
|
description = "A free, portable and enhanced version of the Dink Smallwood game engine";
|
||||||
|
|
||||||
|
@ -11,6 +11,13 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ gtk openssl ];
|
buildInputs = [ gtk openssl ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
# Build fails on Linux with windres.
|
||||||
|
export ac_cv_prog_WINDRES=
|
||||||
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Mascot Constructive Pilot for X";
|
description = "Mascot Constructive Pilot for X";
|
||||||
homepage = http://rosegray.sakura.ne.jp/macopix/index-e.html;
|
homepage = http://rosegray.sakura.ne.jp/macopix/index-e.html;
|
||||||
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
cp -r mudlet-lua $out
|
cp -r mudlet-lua $out
|
||||||
|
|
||||||
makeWrapper $out/mudlet $out/bin/mudlet \
|
makeWrapper $out/mudlet $out/bin/mudlet \
|
||||||
--set LUA_CPATH "\"${luaFileSystemPath};${luaZipPath};${lrexlibPath};${luasqlitePath}\"" \
|
--set LUA_CPATH "${luaFileSystemPath};${luaZipPath};${lrexlibPath};${luasqlitePath}" \
|
||||||
--run "cd $out";
|
--run "cd $out";
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ let
|
|||||||
--add-flags "-L $COREDIR/${d2u core}_libretro.so $@"
|
--add-flags "-L $COREDIR/${d2u core}_libretro.so $@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
core = core;
|
core = core;
|
||||||
libretroCore = "/lib/retroarch/cores";
|
libretroCore = "/lib/retroarch/cores";
|
||||||
|
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
|
|||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram "$out/bin/retrofe" \
|
wrapProgram "$out/bin/retrofe" \
|
||||||
--prefix GST_PLUGIN_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
|
--prefix GST_PLUGIN_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
|
||||||
--set RETROFE_PATH "\''${RETROFE_PATH:-\$PWD}"
|
--run 'export RETROFE_PATH=''${RETROFE_PATH:-$PWD}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -198,6 +198,22 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
overrides = super: {
|
overrides = super: {
|
||||||
|
AppKit = stdenv.lib.overrideDerivation super.AppKit (drv: {
|
||||||
|
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
|
||||||
|
"/System/Library/PrivateFrameworks/"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
CoreMedia = stdenv.lib.overrideDerivation super.CoreMedia (drv: {
|
||||||
|
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
|
||||||
|
"/System/Library/Frameworks/CoreImage.framework"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
Security = stdenv.lib.overrideDerivation super.Security (drv: {
|
||||||
|
setupHook = ./security-setup-hook.sh;
|
||||||
|
});
|
||||||
|
|
||||||
QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: {
|
QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: {
|
||||||
installPhase = drv.installPhase + ''
|
installPhase = drv.installPhase + ''
|
||||||
f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h"
|
f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h"
|
||||||
@ -205,16 +221,6 @@ in rec {
|
|||||||
--replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage"
|
--replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
CoreServices = stdenv.lib.overrideDerivation super.CoreServices (drv: {
|
|
||||||
__propagatedSandboxProfile = drv.__propagatedSandboxProfile ++ [''
|
|
||||||
(allow mach-lookup (global-name "com.apple.CoreServices.coreservicesd"))
|
|
||||||
''];
|
|
||||||
});
|
|
||||||
|
|
||||||
Security = stdenv.lib.overrideDerivation super.Security (drv: {
|
|
||||||
setupHook = ./security-setup-hook.sh;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix {
|
bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix {
|
||||||
|
@ -1,24 +1,22 @@
|
|||||||
{ stdenv, appleDerivation }:
|
{ stdenv, appleDerivation }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
postUnpack = ''
|
prePatch = ''
|
||||||
substituteInPlace $sourceRoot/Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace "/usr/lib" "/lib" \
|
--replace /usr/lib /lib \
|
||||||
--replace "/usr/local/lib" "/lib" \
|
--replace /usr/local/lib /lib \
|
||||||
--replace "/usr/bin" "" \
|
--replace /usr/bin "" \
|
||||||
--replace "/bin/" "" \
|
--replace /bin/ "" \
|
||||||
--replace "CC = " "CC = cc #" \
|
--replace "CC = " "CC = cc #" \
|
||||||
--replace "SDK_DIR = " "SDK_DIR = . #"
|
--replace "SDK_DIR = " "SDK_DIR = . #" \
|
||||||
|
|
||||||
|
# Mac OS didn't support rpaths back before 10.5, but we don't care about it.
|
||||||
|
substituteInPlace Makefile \
|
||||||
|
--replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.6 \
|
||||||
|
--replace -mmacosx-version-min=10.5 -mmacosx-version-min=10.6
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Mac OS didn't support rpaths back before 10.5, and this package intentionally builds stubs targeting versions prior to that
|
installFlags = [ "DSTROOT=$(out)" ];
|
||||||
NIX_DONT_SET_RPATH = "1";
|
|
||||||
NIX_NO_SELF_RPATH = "1";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
export DSTROOT=$out
|
|
||||||
make install
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Apple's common startup stubs for darwin";
|
description = "Apple's common startup stubs for darwin";
|
||||||
|
@ -23,7 +23,7 @@ appleDerivation rec {
|
|||||||
(cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
|
(cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
|
||||||
done
|
done
|
||||||
|
|
||||||
(cd ${cctools}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
|
(cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
|
||||||
|
|
||||||
cat <<EOF > $out/include/TargetConditionals.h
|
cat <<EOF > $out/include/TargetConditionals.h
|
||||||
#ifndef __TARGETCONDITIONALS__
|
#ifndef __TARGETCONDITIONALS__
|
||||||
|
@ -8,10 +8,6 @@ appleDerivation {
|
|||||||
|
|
||||||
propagatedBuildInputs = [ Security ];
|
propagatedBuildInputs = [ Security ];
|
||||||
|
|
||||||
propagatedSandboxProfile = ''
|
|
||||||
(allow mach-lookup (global-name "com.apple.SystemConfiguration.configd"))
|
|
||||||
'';
|
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
HACK=$PWD/hack
|
HACK=$PWD/hack
|
||||||
mkdir $HACK
|
mkdir $HACK
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{ stdenv, appleDerivation, fetchzip, bootstrap_cmds, bison, flex, gnum4, unifdef, perl }:
|
{ stdenv, appleDerivation, fetchzip, bootstrap_cmds, bison, flex, gnum4, unifdef, perl, python }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
||||||
|
|
||||||
buildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl ];
|
buildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
|
@ -37,17 +37,8 @@ stdenv.mkDerivation {
|
|||||||
ln -sf "${cctools}/bin/$i" "$out/bin/$i"
|
ln -sf "${cctools}/bin/$i" "$out/bin/$i"
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in ${stdenv.lib.getDev binutils-raw}/include/*.h; do
|
|
||||||
ln -s "$i" "$out/include/$(basename $i)"
|
|
||||||
done
|
|
||||||
|
|
||||||
for i in ${cctools}/include/*; do
|
|
||||||
ln -s "$i" "$out/include/$(basename $i)"
|
|
||||||
done
|
|
||||||
|
|
||||||
# FIXME: this will give us incorrect man pages for bits of cctools
|
# FIXME: this will give us incorrect man pages for bits of cctools
|
||||||
ln -s ${binutils-raw.out}/share $out/share
|
ln -s ${binutils-raw.out}/share $out/share
|
||||||
ln -s ${binutils-raw.out}/lib $out/lib
|
|
||||||
|
|
||||||
ln -s ${cctools}/libexec $out/libexec
|
ln -s ${cctools}/libexec $out/libexec
|
||||||
'';
|
'';
|
||||||
|
@ -29,6 +29,8 @@ let
|
|||||||
sha256 = "0l45mvyags56jfi24rawms8j2ihbc45mq7v13pkrrwppghqrdn52";
|
sha256 = "0l45mvyags56jfi24rawms8j2ihbc45mq7v13pkrrwppghqrdn52";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake libtool_2 ];
|
nativeBuildInputs = [ autoconf automake libtool_2 ];
|
||||||
buildInputs = [ libuuid ] ++
|
buildInputs = [ libuuid ] ++
|
||||||
# Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang)
|
# Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang)
|
||||||
@ -39,6 +41,12 @@ let
|
|||||||
./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch
|
./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
__propagatedImpureHostDeps = [
|
||||||
|
# As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
|
||||||
|
"/usr/lib/libobjc.A.dylib"
|
||||||
|
"/usr/lib/libobjc.dylib"
|
||||||
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "alsa-lib-1.1.4.1";
|
name = "alsa-lib-1.1.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
urls = [
|
urls = [
|
||||||
"ftp://ftp.alsa-project.org/pub/lib/${name}.tar.bz2"
|
"ftp://ftp.alsa-project.org/pub/lib/${name}.tar.bz2"
|
||||||
"http://alsa.cybermirror.org/lib/${name}.tar.bz2"
|
"http://alsa.cybermirror.org/lib/${name}.tar.bz2"
|
||||||
];
|
];
|
||||||
sha256 = "0xjvi381105gldhv0z872a0x58sghznyx19j45lw5iyi2h68gfwi";
|
sha256 = "1rhacnlj0grvfagjx5qzsnbhw7m7lyccghqs4jsv0dnsqv9qmxpl";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
{ stdenv, fetchurl, lib, pkgconfig, alsaLib, libogg, libpulseaudio ? null, libjack2 ? null }:
|
{ stdenv, fetchurl, lib, pkgconfig, alsaLib, libogg, libpulseaudio ? null, libjack2 ? null }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "alsa-plugins-1.1.4";
|
name = "alsa-plugins-1.1.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
urls = [
|
urls = [
|
||||||
"ftp://ftp.alsa-project.org/pub/plugins/${name}.tar.bz2"
|
"ftp://ftp.alsa-project.org/pub/plugins/${name}.tar.bz2"
|
||||||
"http://alsa.cybermirror.org/plugins/${name}.tar.bz2"
|
"http://alsa.cybermirror.org/plugins/${name}.tar.bz2"
|
||||||
];
|
];
|
||||||
sha256 = "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak";
|
sha256 = "073zpgvj4pldmzqq97l40wngvbqnvrkc8yw153mgny9kypwaazbr";
|
||||||
};
|
};
|
||||||
|
|
||||||
# ToDo: a52, etc.?
|
# ToDo: a52, etc.?
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "alsa-tools-${version}";
|
name = "alsa-tools-${version}";
|
||||||
version = "1.1.3";
|
version = "1.1.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
urls = [
|
urls = [
|
||||||
"ftp://ftp.alsa-project.org/pub/tools/${name}.tar.bz2"
|
"ftp://ftp.alsa-project.org/pub/tools/${name}.tar.bz2"
|
||||||
"http://alsa.cybermirror.org/tools/${name}.tar.bz2"
|
"http://alsa.cybermirror.org/tools/${name}.tar.bz2"
|
||||||
];
|
];
|
||||||
sha256 = "02b75fyfmm9m2iz59d3xa97cas4f697a4pzdxn1i64kjd36iv3yq";
|
sha256 = "0d6m5dm5yskfr6q42cv1ihp5lfgv4a67nj39gpp26ll3vrknag5w";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "alsa-utils-${version}";
|
name = "alsa-utils-${version}";
|
||||||
version = "1.1.4";
|
version = "1.1.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
urls = [
|
urls = [
|
||||||
"ftp://ftp.alsa-project.org/pub/utils/${name}.tar.bz2"
|
"ftp://ftp.alsa-project.org/pub/utils/${name}.tar.bz2"
|
||||||
"http://alsa.cybermirror.org/utils/${name}.tar.bz2"
|
"http://alsa.cybermirror.org/utils/${name}.tar.bz2"
|
||||||
];
|
];
|
||||||
sha256 = "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7";
|
sha256 = "1s727md6mb408y2cfwzjkx23abxhampyrjdkgpyygdhxx62x42rj";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "iproute2-${version}";
|
name = "iproute2-${version}";
|
||||||
version = "4.13.0";
|
version = "4.14.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kernel/linux/utils/net/iproute2/${name}.tar.xz";
|
url = "mirror://kernel/linux/utils/net/iproute2/${name}.tar.xz";
|
||||||
sha256 = "0l2w84cwr54gaw3cbxijf614l76hx8mgcz57v81rwl68z3nq3yww";
|
sha256 = "0rq0n7yxb0hmk0s6wx5awzjgf7ikjbibd0a5ix20ldfcmxlc0fnl";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, thin-provisioning-tools, enable_dmeventd ? false }:
|
, thin-provisioning-tools, enable_dmeventd ? false }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "2.02.175";
|
version = "2.02.176";
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -10,7 +10,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.${version}.tgz";
|
url = "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.${version}.tgz";
|
||||||
sha256 = "0n95cc2b0jb0fh2pd9jyg9ww7lyzpia9n9sryw9f4aq8dpna7dsd";
|
sha256 = "0wx4rvy4frdmb66znh2xms2j2n06sm361ki6l5ks4y1ciii87kny";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
|||||||
for i in "$out"/bin/*; do
|
for i in "$out"/bin/*; do
|
||||||
wrapProgram "$i" \
|
wrapProgram "$i" \
|
||||||
--prefix "PATH" : "${java}/bin/" \
|
--prefix "PATH" : "${java}/bin/" \
|
||||||
--set "FUSEKI_HOME" '"''${FUSEKI_HOME:-'"$out"'}"' \
|
--set-default "FUSEKI_HOME" "$out" \
|
||||||
;
|
;
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
|||||||
makeWrapper "$i" "$out/bin/''${i##*/}" \
|
makeWrapper "$i" "$out/bin/''${i##*/}" \
|
||||||
--set ORACLE_HOME "$out/libexec/oracle" \
|
--set ORACLE_HOME "$out/libexec/oracle" \
|
||||||
--set ORACLE_SID XE \
|
--set ORACLE_SID XE \
|
||||||
--set NLS_LANG '$("'"$out"'/libexec/oracle/bin/nls_lang.sh")' \
|
--run "export NLS_LANG=\$($out/libexec/oracle/bin/nls_lang.sh)" \
|
||||||
--prefix PATH : "$out/libexec/oracle/bin"
|
--prefix PATH : "$out/libexec/oracle/bin"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
# Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
|
# Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
|
||||||
, bootstrapFiles ? let
|
, bootstrapFiles ? let
|
||||||
fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
|
fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
|
||||||
url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/10cbca5b30c6cb421ce15139f32ae3a4977292cf/${file}";
|
url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/d5bdfcbfe6346761a332918a267e82799ec954d2/${file}";
|
||||||
inherit (localSystem) system;
|
inherit (localSystem) system;
|
||||||
inherit sha256 executable;
|
inherit sha256 executable;
|
||||||
}; in {
|
}; in {
|
||||||
sh = fetch { file = "sh"; sha256 = "0s8a9vpzj6vadq4jmf4r8cargwnsf327hdjydxgqsfxb8y1q39w3"; };
|
sh = fetch { file = "sh"; sha256 = "07wm33f1yzfpcd3rh42f8g096k4cvv7g65p968j28agzmm2s7s8m"; };
|
||||||
bzip2 = fetch { file = "bzip2"; sha256 = "1jqljpjr8mkiv7g5rl5impqx3all8vn1mxxdwa004pr3h48c1zgg"; };
|
bzip2 = fetch { file = "bzip2"; sha256 = "0y9ri2aprkrp2dkzm6229l0mw4rxr2jy7vvh3d8mxv2698v2kdbm"; };
|
||||||
mkdir = fetch { file = "mkdir"; sha256 = "17zsjiwnq07i5r85q1hg7f6cnkcgllwy2amz9klaqwjy4vzz4vwh"; };
|
mkdir = fetch { file = "mkdir"; sha256 = "0sb07xpy66ws6f2jfnpjibyimzb71al8n8c6y4nr8h50al3g90nr"; };
|
||||||
cpio = fetch { file = "cpio"; sha256 = "04hrair58dgja6syh442pswiga5an9nl58ls57yknkn2pq51nx9m"; };
|
cpio = fetch { file = "cpio"; sha256 = "0r5c54hg678w7zydx27bzl9p3v9fs25y5ix6vdfi1ilqim7xh65n"; };
|
||||||
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "103833hrci0vwi1gi978hkp69rncicvpdszn87ffpf1cq0jzpa14"; executable = false; };
|
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "18hp5w6klr8g307ap4368r255qpzg9r0vwg9vqvj8f2zy1xilcjf"; executable = false; };
|
||||||
}
|
}
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -21,9 +21,11 @@ assert crossSystem == null;
|
|||||||
let
|
let
|
||||||
inherit (localSystem) system platform;
|
inherit (localSystem) system platform;
|
||||||
|
|
||||||
libSystemProfile = ''
|
commonImpureHostDeps = [
|
||||||
(import "${./standard-sandbox.sb}")
|
"/bin/sh"
|
||||||
'';
|
"/usr/lib/libSystem.B.dylib"
|
||||||
|
"/usr/lib/system/libunc.dylib" # This dependency is "hidden", so our scanning code doesn't pick it up
|
||||||
|
];
|
||||||
in rec {
|
in rec {
|
||||||
commonPreHook = ''
|
commonPreHook = ''
|
||||||
export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
|
export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
|
||||||
@ -37,11 +39,6 @@ in rec {
|
|||||||
export gl_cv_func_getcwd_abort_bug=no
|
export gl_cv_func_getcwd_abort_bug=no
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# The one dependency of /bin/sh :(
|
|
||||||
binShClosure = ''
|
|
||||||
(allow file-read* (literal "/usr/lib/libncurses.5.4.dylib"))
|
|
||||||
'';
|
|
||||||
|
|
||||||
bootstrapTools = derivation rec {
|
bootstrapTools = derivation rec {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
@ -53,7 +50,7 @@ in rec {
|
|||||||
reexportedLibrariesFile =
|
reexportedLibrariesFile =
|
||||||
../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries;
|
../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries;
|
||||||
|
|
||||||
__sandboxProfile = binShClosure + libSystemProfile;
|
__impureHostDeps = commonImpureHostDeps;
|
||||||
};
|
};
|
||||||
|
|
||||||
stageFun = step: last: {shell ? "${bootstrapTools}/bin/bash",
|
stageFun = step: last: {shell ? "${bootstrapTools}/bin/bash",
|
||||||
@ -108,8 +105,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# The stdenvs themselves don't use mkDerivation, so I need to specify this here
|
# The stdenvs themselves don't use mkDerivation, so I need to specify this here
|
||||||
stdenvSandboxProfile = binShClosure + libSystemProfile;
|
__stdenvImpureHostDeps = commonImpureHostDeps;
|
||||||
extraSandboxProfile = binShClosure + libSystemProfile;
|
__extraImpureHostDeps = commonImpureHostDeps;
|
||||||
|
|
||||||
extraAttrs = {
|
extraAttrs = {
|
||||||
inherit platform;
|
inherit platform;
|
||||||
@ -167,7 +164,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
stage1 = prevStage: let
|
stage1 = prevStage: let
|
||||||
persistent = _: _: {};
|
persistent = _: super: { python = super.python.override { configd = null; }; };
|
||||||
in with prevStage; stageFun 1 prevStage {
|
in with prevStage; stageFun 1 prevStage {
|
||||||
extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\"";
|
extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\"";
|
||||||
extraNativeBuildInputs = [];
|
extraNativeBuildInputs = [];
|
||||||
@ -317,8 +314,8 @@ in rec {
|
|||||||
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
||||||
'';
|
'';
|
||||||
|
|
||||||
stdenvSandboxProfile = binShClosure + libSystemProfile;
|
__stdenvImpureHostDeps = commonImpureHostDeps;
|
||||||
extraSandboxProfile = binShClosure + libSystemProfile;
|
__extraImpureHostDeps = commonImpureHostDeps;
|
||||||
|
|
||||||
initialPath = import ../common-path.nix { inherit pkgs; };
|
initialPath = import ../common-path.nix { inherit pkgs; };
|
||||||
shell = "${pkgs.bash}/bin/bash";
|
shell = "${pkgs.bash}/bin/bash";
|
||||||
@ -353,7 +350,7 @@ in rec {
|
|||||||
bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
|
bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
|
||||||
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
|
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
|
||||||
gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out
|
gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out
|
||||||
binutils-raw.dev binutils gettext
|
binutils gettext
|
||||||
cc.expand-response-params
|
cc.expand-response-params
|
||||||
]) ++ (with pkgs.darwin; [
|
]) ++ (with pkgs.darwin; [
|
||||||
dyld Libsystem CF cctools ICU libiconv locale
|
dyld Libsystem CF cctools ICU libiconv locale
|
||||||
@ -364,6 +361,10 @@ in rec {
|
|||||||
clang = cc;
|
clang = cc;
|
||||||
llvmPackages = persistent'.llvmPackages // { clang = cc; };
|
llvmPackages = persistent'.llvmPackages // { clang = cc; };
|
||||||
inherit cc;
|
inherit cc;
|
||||||
|
|
||||||
|
darwin = super.darwin // {
|
||||||
|
xnu = super.darwin.xnu.override { python = super.python.override { configd = null; }; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,72 +0,0 @@
|
|||||||
(define TMPDIR (param "_GLOBAL_TMP_DIR"))
|
|
||||||
|
|
||||||
; obvious
|
|
||||||
(allow process-fork)
|
|
||||||
|
|
||||||
; allow reading system information like #CPUs, etc.
|
|
||||||
(allow sysctl-read)
|
|
||||||
|
|
||||||
; IPC
|
|
||||||
(allow ipc-posix*)
|
|
||||||
|
|
||||||
; Unix sockets
|
|
||||||
(allow system-socket)
|
|
||||||
|
|
||||||
; all runtime dependencies of libSystem.dylib
|
|
||||||
(allow file-read*
|
|
||||||
(literal "/usr/lib/libSystem.dylib")
|
|
||||||
(literal "/usr/lib/libSystem.B.dylib")
|
|
||||||
(literal "/usr/lib/libobjc.A.dylib")
|
|
||||||
(literal "/usr/lib/libobjc.dylib")
|
|
||||||
(literal "/usr/lib/libauto.dylib")
|
|
||||||
(literal "/usr/lib/libc++abi.dylib")
|
|
||||||
(literal "/usr/lib/libc++.1.dylib")
|
|
||||||
(literal "/usr/lib/libDiagnosticMessagesClient.dylib")
|
|
||||||
(subpath "/usr/lib/system"))
|
|
||||||
|
|
||||||
; tmp
|
|
||||||
(allow file* process-exec (literal "/tmp") (subpath TMPDIR))
|
|
||||||
|
|
||||||
; clang likes to read the system version
|
|
||||||
(allow file-read* (literal "/System/Library/CoreServices/SystemVersion.plist"))
|
|
||||||
|
|
||||||
; used for bootstrap builders
|
|
||||||
(allow process-exec* (literal "/bin/sh"))
|
|
||||||
|
|
||||||
; without this line clang cannot write to /dev/null, breaking some configure tests
|
|
||||||
(allow file-read-metadata (literal "/dev"))
|
|
||||||
|
|
||||||
; standard devices
|
|
||||||
(allow file*
|
|
||||||
(literal "/dev/null")
|
|
||||||
(literal "/dev/random")
|
|
||||||
(literal "/dev/stdin")
|
|
||||||
(literal "/dev/stdout")
|
|
||||||
(literal "/dev/tty")
|
|
||||||
(literal "/dev/urandom")
|
|
||||||
(literal "/dev/zero")
|
|
||||||
(subpath "/dev/fd"))
|
|
||||||
|
|
||||||
; does nothing, but reduces build noise
|
|
||||||
(allow file* (literal "/dev/dtracehelper"))
|
|
||||||
|
|
||||||
; ICU data and zoneinfo data are hardcoded
|
|
||||||
; both are in libicucore and zoneinfo is in libsystem_c as well
|
|
||||||
(allow file-read* (subpath "/usr/share/icu") (subpath "/usr/share/zoneinfo"))
|
|
||||||
|
|
||||||
; no idea what this is
|
|
||||||
(allow file-read-data (literal "/dev/autofs_nowait"))
|
|
||||||
|
|
||||||
; lots of autoconf projects want to list this directory
|
|
||||||
(allow file-read-metadata (literal "/var") (literal "/private/var/tmp"))
|
|
||||||
|
|
||||||
; send signals
|
|
||||||
(allow signal (target same-sandbox))
|
|
||||||
|
|
||||||
; allow getpwuid (for git and other packages)
|
|
||||||
(allow mach-lookup
|
|
||||||
(global-name "com.apple.system.notification_center")
|
|
||||||
(global-name "com.apple.system.opendirectoryd.libinfo"))
|
|
||||||
|
|
||||||
; allow networking on localhost
|
|
||||||
(allow network* (local ip) (remote unix-socket))
|
|
@ -324,6 +324,18 @@ findInputs() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then
|
||||||
|
local pkgNext
|
||||||
|
for pkgNext in $(< "$pkg/nix-support/$propagatedBuildInputsFile"); do
|
||||||
|
findInputs "$pkgNext" "$var" "$propagatedBuildInputsFile"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add package to the future PATH and run setup hooks
|
||||||
|
activatePackage() {
|
||||||
|
local pkg="$1"
|
||||||
|
|
||||||
if [ -f "$pkg" ]; then
|
if [ -f "$pkg" ]; then
|
||||||
local oldOpts="$(shopt -po nounset)"
|
local oldOpts="$(shopt -po nounset)"
|
||||||
set +u
|
set +u
|
||||||
@ -341,13 +353,6 @@ findInputs() {
|
|||||||
source "$pkg/nix-support/setup-hook"
|
source "$pkg/nix-support/setup-hook"
|
||||||
eval "$oldOpts"
|
eval "$oldOpts"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then
|
|
||||||
local pkgNext
|
|
||||||
for pkgNext in $(< "$pkg/nix-support/$propagatedBuildInputsFile"); do
|
|
||||||
findInputs "$pkgNext" "$var" "$propagatedBuildInputsFile"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -a nativePkgs crossPkgs
|
declare -a nativePkgs crossPkgs
|
||||||
@ -359,15 +364,22 @@ if [ -z "${crossConfig:-}" ]; then
|
|||||||
${propagatedNativeBuildInputs:-} ${propagatedBuildInputs:-}; do
|
${propagatedNativeBuildInputs:-} ${propagatedBuildInputs:-}; do
|
||||||
findInputs "$i" nativePkgs propagated-native-build-inputs
|
findInputs "$i" nativePkgs propagated-native-build-inputs
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for i in "${nativePkgs[@]}"; do
|
||||||
|
activatePackage "$i"
|
||||||
|
done
|
||||||
else
|
else
|
||||||
for i in ${buildInputs:-} ${defaultBuildInputs:-} ${propagatedBuildInputs:-}; do
|
for i in ${buildInputs:-} ${defaultBuildInputs:-} ${propagatedBuildInputs:-}; do
|
||||||
findInputs "$i" crossPkgs propagated-build-inputs
|
findInputs "$i" crossPkgs propagated-build-inputs
|
||||||
done
|
done
|
||||||
|
|
||||||
declare -a nativePkgs
|
|
||||||
for i in ${nativeBuildInputs:-} ${defaultNativeBuildInputs:-} ${propagatedNativeBuildInputs:-}; do
|
for i in ${nativeBuildInputs:-} ${defaultNativeBuildInputs:-} ${propagatedNativeBuildInputs:-}; do
|
||||||
findInputs "$i" nativePkgs propagated-native-build-inputs
|
findInputs "$i" nativePkgs propagated-native-build-inputs
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for i in "${nativePkgs[@]}" "${crossPkgs[@]}"; do
|
||||||
|
activatePackage "$i"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -179,7 +179,6 @@ rec {
|
|||||||
for i in as ld ar ranlib nm strip readelf objdump; do
|
for i in as ld ar ranlib nm strip readelf objdump; do
|
||||||
cp ${binutils.out}/bin/$i $out/bin
|
cp ${binutils.out}/bin/$i $out/bin
|
||||||
done
|
done
|
||||||
cp -d ${binutils.lib}/lib/lib*.so* $out/lib
|
|
||||||
|
|
||||||
chmod -R u+w $out
|
chmod -R u+w $out
|
||||||
|
|
||||||
|
@ -128,7 +128,6 @@ rec {
|
|||||||
for i in as ld ar ranlib nm strip readelf objdump; do
|
for i in as ld ar ranlib nm strip readelf objdump; do
|
||||||
cp ${binutils.out}/bin/$i $out/bin
|
cp ${binutils.out}/bin/$i $out/bin
|
||||||
done
|
done
|
||||||
cp -d ${binutils.lib}/lib/lib*.so* $out/lib
|
|
||||||
|
|
||||||
chmod -R u+w $out
|
chmod -R u+w $out
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, binutils }:
|
{ stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, libiberty }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.3.0";
|
version = "0.3.0";
|
||||||
@ -10,10 +10,10 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "11cqfcjl128nfg1rjvpvr9x1x2ch3kyliw4vi14n51zqp82f9ysb";
|
sha256 = "11cqfcjl128nfg1rjvpvr9x1x2ch3kyliw4vi14n51zqp82f9ysb";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [cmake libgcrypt json_c curl expat stdenv binutils boost];
|
buildInputs = [cmake libgcrypt json_c curl expat stdenv libiberty boost];
|
||||||
|
|
||||||
# work around new binutils headers, see
|
# work around new libiberty headers, see
|
||||||
# http://stackoverflow.com/questions/11748035/binutils-bfd-h-wants-config-h-now
|
# http://stackoverflow.com/questions/11748035/libiberty-bfd-h-wants-config-h-now
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
sed -i '1i#define PACKAGE "grive"\n#define PACKAGE_VERSION "${version}"' \
|
sed -i '1i#define PACKAGE "grive"\n#define PACKAGE_VERSION "${version}"' \
|
||||||
libgrive/src/bfd/SymbolInfo.cc
|
libgrive/src/bfd/SymbolInfo.cc
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, pkgconfig, fetchurl, yajl, cmake, libgcrypt, curl, expat, boost, binutils }:
|
{ stdenv, fetchFromGitHub, pkgconfig, fetchurl, yajl, cmake, libgcrypt, curl, expat, boost, libiberty }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.5.0";
|
version = "0.5.0";
|
||||||
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
|
|
||||||
buildInputs = [ libgcrypt yajl curl expat stdenv boost binutils ];
|
buildInputs = [ libgcrypt yajl curl expat stdenv boost libiberty ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A console Google Drive client";
|
description = "A console Google Drive client";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ lib, stdenv, fetchgit, python3Packages, docutils
|
{ lib, stdenv, fetchgit, python3Packages, docutils
|
||||||
, acl, apktool, binutils, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, diffutils, dtc
|
, acl, apktool, libbfd, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, diffutils, dtc
|
||||||
, e2fsprogs, file, findutils, fontforge-fonttools, fpc, gettext, ghc, ghostscriptX, giflib, gnupg1, gnutar
|
, e2fsprogs, file, findutils, fontforge-fonttools, fpc, gettext, ghc, ghostscriptX, giflib, gnupg1, gnutar
|
||||||
, gzip, imagemagick, jdk, libarchive, libcaca, llvm, mono, openssh, pdftk, pgpdump, poppler_utils, sng, sqlite
|
, gzip, imagemagick, jdk, libarchive, libcaca, llvm, mono, openssh, pdftk, pgpdump, poppler_utils, sng, sqlite
|
||||||
, squashfsTools, tcpdump, unoconv, unzip, xxd, xz
|
, squashfsTools, tcpdump, unoconv, unzip, xxd, xz
|
||||||
@ -28,7 +28,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
# Still missing these tools: docx2txt enjarify js-beautify oggDump Rscript
|
# Still missing these tools: docx2txt enjarify js-beautify oggDump Rscript
|
||||||
# Also these libraries: python3-guestfs
|
# Also these libraries: python3-guestfs
|
||||||
pythonPath = with python3Packages; [ debian libarchive-c python_magic tlsh rpm ] ++ [
|
pythonPath = with python3Packages; [ debian libarchive-c python_magic tlsh rpm ] ++ [
|
||||||
acl binutils bzip2 cdrkit colordiff coreutils cpio diffutils dtc e2fsprogs file findutils
|
acl libbfd bzip2 cdrkit colordiff coreutils cpio diffutils dtc e2fsprogs file findutils
|
||||||
fontforge-fonttools gettext gnutar gzip libarchive libcaca pgpdump sng sqlite
|
fontforge-fonttools gettext gnutar gzip libarchive libcaca pgpdump sng sqlite
|
||||||
squashfsTools unzip xxd xz
|
squashfsTools unzip xxd xz
|
||||||
] ++ lib.optionals enableBloat [
|
] ++ lib.optionals enableBloat [
|
||||||
|
@ -28,6 +28,10 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
|
"--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
configureFlagsArray+=("--with-sections=1 n l 8 3 0 2 5 4 9 6 7")
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# apropos/whatis uses program name to decide whether to act like apropos or whatis
|
# apropos/whatis uses program name to decide whether to act like apropos or whatis
|
||||||
# (multi-call binary). `apropos` is actually just a symlink to whatis. So we need to
|
# (multi-call binary). `apropos` is actually just a symlink to whatis. So we need to
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ stdenv, fetchurl, cpio, zlib, bzip2, file, elfutils, libarchive, nspr, nss, popt, db, xz, python, lua, pkgconfig, binutils, autoreconfHook }:
|
{ stdenv
|
||||||
|
, pkgconfig, autoreconfHook
|
||||||
|
, fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libarchive, nspr, nss, popt, db, xz, python, lua
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "rpm-${version}";
|
name = "rpm-${version}";
|
||||||
@ -15,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ];
|
buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ];
|
||||||
|
|
||||||
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
|
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
|
||||||
propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive binutils ];
|
propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive libbfd ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss";
|
NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss";
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ stdenv, fetchgit, autoconf, automake, utillinux, openssl, libuuid, gnu-efi
|
{ stdenv
|
||||||
, binutils, pkgconfig, help2man }:
|
, fetchgit, autoconf, automake, pkgconfig, help2man
|
||||||
|
, utillinux, openssl, libuuid, gnu-efi, libbfd
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "sbsigntool-${version}";
|
name = "sbsigntool-${version}";
|
||||||
@ -15,8 +17,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
prePatch = "patchShebangs .";
|
prePatch = "patchShebangs .";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ autoconf automake pkgconfig help2man ];
|
||||||
buildInputs = [ autoconf automake utillinux openssl libuuid gnu-efi binutils help2man ];
|
buildInputs = [ utillinux openssl libuuid gnu-efi libbfd ];
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
substituteInPlace configure.ac --replace "@@NIX_GNUEFI@@" "${gnu-efi}"
|
substituteInPlace configure.ac --replace "@@NIX_GNUEFI@@" "${gnu-efi}"
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which }:
|
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "pciutils-3.5.5"; # with database from 2017-07
|
name = "pciutils-3.5.6"; # with database from 2017-07
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kernel/software/utils/pciutils/${name}.tar.xz";
|
url = "mirror://kernel/software/utils/pciutils/${name}.tar.xz";
|
||||||
sha256 = "1d62f8fa192f90e61c35a6fc15ff3cb9a7a792f782407acc42ef67817c5939f5";
|
sha256 = "08dvsk1b5m1r7qqzsm849h4glq67mngf8zw7bg0102ff1jwywipk";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "groff-1.22.3";
|
name = "groff-${version}";
|
||||||
|
version = "1.22.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/groff/${name}.tar.gz";
|
url = "mirror://gnu/groff/${name}.tar.gz";
|
||||||
sha256 = "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s";
|
sha256 = "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "man" "doc" "info" ];
|
outputs = [ "out" "man" "doc" "info" "perl" ];
|
||||||
|
|
||||||
enableParallelBuilding = false;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
@ -30,8 +31,7 @@ stdenv.mkDerivation rec {
|
|||||||
--replace "@PNMTOPS_NOSETPAGE@" "${netpbm}/bin/pnmtops -nosetpage"
|
--replace "@PNMTOPS_NOSETPAGE@" "${netpbm}/bin/pnmtops -nosetpage"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ ghostscript psutils netpbm ];
|
buildInputs = [ ghostscript psutils netpbm perl ];
|
||||||
nativeBuildInputs = [ perl ];
|
|
||||||
|
|
||||||
# Builds running without a chroot environment may detect the presence
|
# Builds running without a chroot environment may detect the presence
|
||||||
# of /usr/X11 in the host system, leading to an impure build of the
|
# of /usr/X11 in the host system, leading to an impure build of the
|
||||||
@ -62,6 +62,41 @@ stdenv.mkDerivation rec {
|
|||||||
for f in 'man.local' 'mdoc.local'; do
|
for f in 'man.local' 'mdoc.local'; do
|
||||||
cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f"
|
cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
moveToOutput bin/gropdf $perl
|
||||||
|
moveToOutput bin/pdfmom $perl
|
||||||
|
moveToOutput bin/roff2text $perl
|
||||||
|
moveToOutput bin/roff2pdf $perl
|
||||||
|
moveToOutput bin/roff2ps $perl
|
||||||
|
moveToOutput bin/roff2dvi $perl
|
||||||
|
moveToOutput bin/roff2ps $perl
|
||||||
|
moveToOutput bin/roff2html $perl
|
||||||
|
moveToOutput bin/glilypond $perl
|
||||||
|
moveToOutput bin/mmroff $perl
|
||||||
|
moveToOutput bin/roff2x $perl
|
||||||
|
moveToOutput bin/afmtodit $perl
|
||||||
|
moveToOutput bin/gperl $perl
|
||||||
|
moveToOutput bin/chem $perl
|
||||||
|
moveToOutput share/groff/${version}/font/devpdf $perl
|
||||||
|
|
||||||
|
# idk if this is needed, but Fedora does it
|
||||||
|
moveToOutput share/groff/${version}/tmac/pdf.tmac $perl
|
||||||
|
|
||||||
|
moveToOutput bin/gpinyin $perl
|
||||||
|
moveToOutput lib/groff/gpinyin $perl
|
||||||
|
substituteInPlace $perl/bin/gpinyin \
|
||||||
|
--replace $out/lib/groff/gpinyin $perl/lib/groff/gpinyin
|
||||||
|
|
||||||
|
moveToOutput bin/groffer $perl
|
||||||
|
moveToOutput lib/groff/groffer $perl
|
||||||
|
substituteInPlace $perl/bin/groffer \
|
||||||
|
--replace $out/lib/groff/groffer $perl/lib/groff/groffer
|
||||||
|
|
||||||
|
moveToOutput bin/grog $perl
|
||||||
|
moveToOutput lib/groff/grog $perl
|
||||||
|
substituteInPlace $perl/bin/grog \
|
||||||
|
--replace $out/lib/groff/grog $perl/lib/groff/grog
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -82,5 +117,7 @@ stdenv.mkDerivation rec {
|
|||||||
version gxditview of the X11 xditview previewer, and an
|
version gxditview of the X11 xditview previewer, and an
|
||||||
implementation of the -mm macros.
|
implementation of the -mm macros.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
outputsToInstall = [ "out" "perl" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user