Merge commit 'ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a' into gcc-simplify-flags
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "abcl";
|
||||
version = "1.4.0";
|
||||
version = "1.5.0";
|
||||
# or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
|
||||
src = fetchurl {
|
||||
url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz";
|
||||
sha256 = "1y4nixm1459ch6226ikdilcsf91c2rg1d82cqqmcn24kfjl1m62i";
|
||||
sha256 = "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj";
|
||||
};
|
||||
configurePhase = ''
|
||||
mkdir nix-tools
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "arachne-pnr-${version}";
|
||||
version = "2016.08.18";
|
||||
version = "2017.11.05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cseed";
|
||||
repo = "arachne-pnr";
|
||||
rev = "52e69ed207342710080d85c7c639480e74a021d7";
|
||||
sha256 = "15bdw5yxj76lxrwksp6liwmr6l1x77isf4bs50ys9rsnmiwh8c3w";
|
||||
owner = "cseed";
|
||||
repo = "arachne-pnr";
|
||||
rev = "1e81432830c75c505c76e419619f605a6c4c7583";
|
||||
sha256 = "0lzblmi1klbsmd32h8nh027npm1z1a199lng13lcrqwr17lhb7my";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
makeFlags="DESTDIR=$out $makeFlags"
|
||||
'';
|
||||
makeFlags = "ICEBOX=${icestorm}/share/icebox";
|
||||
enableParallelBuilding = true;
|
||||
makeFlags =
|
||||
[ "PREFIX=$(out)" "ICEBOX=${icestorm}/share/icebox"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Place and route tool for FPGAs";
|
||||
@@ -29,8 +29,8 @@ stdenv.mkDerivation rec {
|
||||
the IceStorm [2] icepack command.
|
||||
'';
|
||||
homepage = https://github.com/cseed/arachne-pnr;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = [ stdenv.lib.maintainers.shell ];
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,5 +32,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://readytalk.github.io/avian/;
|
||||
license = stdenv.lib.licenses.isc;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainers = [ stdenv.lib.maintainers.earldouglas ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Assember for the Atmel AVR microcontroller family";
|
||||
description = "Assembler for the Atmel AVR microcontroller family";
|
||||
homepage = http://avra.sourceforge.net/;
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
|
||||
@@ -16,8 +16,9 @@ in stdenv.mkDerivation rec {
|
||||
sha256 = "174abdwfpq8i3ijx6bwqll16lx7xwici374rgsbymyk8g8mla094";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [
|
||||
pkgconfig mono makeWrapper nant shared_mime_info gtksourceview
|
||||
mono makeWrapper nant shared_mime_info gtksourceview
|
||||
gtk2
|
||||
];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchsvn, gcc, glibc, m4, coreutils }:
|
||||
{ stdenv, fetchsvn, fetchpatch, gcc, glibc, m4, coreutils }:
|
||||
|
||||
let
|
||||
options = rec {
|
||||
@@ -39,12 +39,18 @@ stdenv.mkDerivation rec {
|
||||
sha256 = cfg.sha256;
|
||||
};
|
||||
|
||||
patches = fetchpatch {
|
||||
name = "ccl-1.11-glibc-2.26.patch";
|
||||
url = https://patch-diff.githubusercontent.com/raw/Clozure/ccl/pull/80.patch;
|
||||
sha256 = "02v6287w0nppfpvkn9dyd5rvq2zkgd47ia9gs17hrww2hgzr6agd";
|
||||
};
|
||||
|
||||
buildInputs = [ gcc glibc m4 ];
|
||||
|
||||
CCL_RUNTIME = cfg.runtime;
|
||||
CCL_KERNEL = cfg.kernel;
|
||||
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
|
||||
--replace "svnversion" "echo ${revision}" \
|
||||
--replace "/bin/rm" "${coreutils}/bin/rm" \
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "chez-scheme-${version}";
|
||||
version = "9.4-${dver}";
|
||||
dver = "20160507";
|
||||
version = "9.5-${dver}";
|
||||
dver = "20171012";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/cisco/chezscheme.git";
|
||||
rev = "65df1d1f7c37f5b5a93cd7e5b475dda9dbafe03c";
|
||||
sha256 = "1b273il3njnn04z55w1hnygvcqllc6p5qg9mcwh10w39fwsd8fbs";
|
||||
rev = "adb3b7bb22ddaa1ba91b98b6f4a647427c3a4d9b";
|
||||
sha256 = "0hiynf7g0q77ipqxjsqdm2zb0m15bl1hhp615fn3i2hv0qz5a4xr";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
*/
|
||||
patchPhase = ''
|
||||
substituteInPlace ./configure \
|
||||
--replace "git submodule init && git submodule update || exit 1" ""
|
||||
--replace "git submodule init && git submodule update || exit 1" "true"
|
||||
|
||||
substituteInPlace ./workarea \
|
||||
--replace "/bin/ln" "${coreutils}/bin/ln" \
|
||||
|
||||
74
pkgs/development/compilers/clasp/default.nix
Normal file
74
pkgs/development/compilers/clasp/default.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
{stdenv, fetchFromGitHub
|
||||
, llvmPackages
|
||||
, cmake, boehmgc, gmp, zlib, ncurses, boost
|
||||
, waf, python, git, sbcl
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "clasp";
|
||||
version = "0.4.99.20170801";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "drmeister";
|
||||
repo = "clasp";
|
||||
rev = "525ce1cffff39311e3e7df6d0b71fa267779bdf5";
|
||||
sha256 = "1jqya04wybgxnski341p5sycy2gysxad0s5q8d59z0f6ckj3v8k1";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python git sbcl ];
|
||||
|
||||
buildInputs = with llvmPackages; (
|
||||
builtins.map (x: stdenv.lib.overrideDerivation x
|
||||
(x: {NIX_CFLAGS_COMPILE= (x.NIX_CFLAGS_COMPILE or "") + " -frtti"; }))
|
||||
[ llvm clang clang-unwrapped clang ]) ++
|
||||
[
|
||||
gmp zlib ncurses
|
||||
boost boehmgc
|
||||
(boost.override {enableStatic = true; enableShared = false;})
|
||||
(stdenv.lib.overrideDerivation boehmgc
|
||||
(x: {configureFlags = (x.configureFlags or []) ++ ["--enable-static"];}))
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = " -frtti ";
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
export CXX=clang++
|
||||
export CC=clang
|
||||
|
||||
echo "
|
||||
INSTALL_PATH_PREFIX = '$out'
|
||||
" | sed -e 's/^ *//' > wscript.config
|
||||
|
||||
python ./waf configure update_submodules
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
python ./waf build_cboehm
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
python ./waf install_cboehm
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit version;
|
||||
description = ''A Common Lisp implementation based on LLVM with C++ integration'';
|
||||
license = stdenv.lib.licenses.lgpl21Plus ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
homepage = "https://github.com/drmeister/clasp";
|
||||
};
|
||||
}
|
||||
@@ -1,31 +1,30 @@
|
||||
{ stdenv, fetchurl, jre, gnutar, bash }:
|
||||
{ stdenv, fetchurl, jre, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "closure-compiler-${version}";
|
||||
version = "20170218";
|
||||
version = "20170910";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
|
||||
sha256 = "06snabmpy07x4xm8d1xgq5dfzbjli10xkxk3nx9jms39zkj493cd";
|
||||
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
|
||||
sha256 = "0znzsks8ql9qajhcjzfkhmnpz8zs6b8cji04fhivyq973jpxxrak";
|
||||
};
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
sourceRoot = ".";
|
||||
|
||||
buildInputs = [ gnutar ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ jre ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/java $out/bin
|
||||
tar -xzf $src
|
||||
cp -r closure-compiler-v${version}.jar $out/share/java/
|
||||
echo "#!${bash}/bin/bash" > $out/bin/closure-compiler
|
||||
echo "${jre}/bin/java -jar $out/share/java/closure-compiler-v${version}.jar \"\$@\"" >> $out/bin/closure-compiler
|
||||
chmod +x $out/bin/closure-compiler
|
||||
cp closure-compiler-v${version}.jar $out/share/java
|
||||
makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
|
||||
--add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "A tool for making JavaScript download and run faster";
|
||||
homepage = https://developers.google.com/closure/compiler/;
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ assert lib.versionAtLeast ocamlPackages.ocaml.version "4.02";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "compcert-${version}";
|
||||
version = "3.0.1";
|
||||
version = "3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://compcert.inria.fr/release/${name}.tgz";
|
||||
sha256 = "0dgrj26dzdy4n3s9b5hwc6lm54vans1v4qx9hdp1q8w1qqcdriq9";
|
||||
sha256 = "0irfwlw2chalp0g2gw0makc699hn3z37sha1a239p9d90mzx03cx";
|
||||
};
|
||||
|
||||
buildInputs = [ coq ]
|
||||
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configurePhase = ''
|
||||
substituteInPlace VERSION --replace '3.0.1' '3.1'
|
||||
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
|
||||
./configure -clightgen -prefix $out -toolprefix ${tools}/bin/ '' +
|
||||
(if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux");
|
||||
@@ -39,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Formally verified C compiler";
|
||||
homepage = "http://compcert.inria.fr";
|
||||
license = licenses.inria;
|
||||
license = licenses.inria-compcert;
|
||||
platforms = platforms.linux ++
|
||||
platforms.darwin;
|
||||
maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, which
|
||||
, cmake
|
||||
, clang
|
||||
@@ -12,21 +13,29 @@
|
||||
, lttng-ust
|
||||
, liburcu
|
||||
, libuuid
|
||||
, ed
|
||||
, libkrb5
|
||||
, debug ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "coreclr-${version}";
|
||||
version = "1.0.4";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dotnet";
|
||||
repo = "coreclr";
|
||||
rev = "v${version}";
|
||||
sha256 = "1wpig71q0kh2yrq162d32x00zlwrrs1wymkgijh49cqkn4cwkh91";
|
||||
sha256 = "16z58ix8kmk8csfy5qsqz8z30czhrap2vb8s8vdflmbcfnq31jcw";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# glibc 2.26
|
||||
url = https://github.com/dotnet/coreclr/commit/a8f83b615708c529b112898e7d2fbc3f618b26ee.patch;
|
||||
sha256 = "047ph5gip4z2h7liwdxsmpnlaq0sd3hliaw4nyqjp647m80g3ffq";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
which
|
||||
cmake
|
||||
@@ -41,67 +50,43 @@ stdenv.mkDerivation rec {
|
||||
lttng-ust
|
||||
liburcu
|
||||
libuuid
|
||||
ed
|
||||
libkrb5
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
# Prevent clang-3.5 (rather than just clang) from being selected as the compiler as that's
|
||||
# not wrapped
|
||||
# substituteInPlace src/pal/tools/gen-buildsys-clang.sh --replace "which \"clang-\$" "which \"clang-DoNotFindThisOne\$"
|
||||
|
||||
patchShebangs build.sh
|
||||
patchShebangs src/pal/tools/gen-buildsys-clang.sh
|
||||
|
||||
# See https://github.com/dotnet/coreclr/issues/7573#issuecomment-253081323
|
||||
ed -v ./src/pal/src/include/pal/palinternal.h << EOF
|
||||
/^#undef memcpy
|
||||
-1
|
||||
d
|
||||
+1
|
||||
d
|
||||
w
|
||||
EOF
|
||||
# override to avoid cmake running
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
BuildArch = if stdenv.is64bit then "x64" else "x86";
|
||||
BuildType = if debug then "Debug" else "Release";
|
||||
|
||||
hardeningDisable = [ "strictoverflow" "format" ];
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-Wno-error=unused-result" "-Wno-error=delete-non-virtual-dtor"
|
||||
"-Wno-error=null-dereference"
|
||||
hardeningDisable = [
|
||||
"strictoverflow"
|
||||
"format"
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
./build.sh $BuildArch $BuildType
|
||||
|
||||
# Try to make some sensible hierarchy out of the output
|
||||
pushd bin/Product/Linux.$BuildArch.$BuildType
|
||||
mkdir lib2
|
||||
mv *.so *.so.dbg lib2
|
||||
mv bin lib3
|
||||
mkdir lib4
|
||||
mv Loader lib4
|
||||
mv inc include
|
||||
mv gcinfo include
|
||||
mkdir bin
|
||||
mkdir -p share/doc
|
||||
mv sosdocsunix.txt share/doc
|
||||
for f in * ; do test -f $f && mv -v $f bin; done
|
||||
popd
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -rv bin/Product/Linux.$BuildArch.$BuildType/* $out
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/dotnet $out/bin
|
||||
cp -r bin/Product/Linux.$BuildArch.$BuildType/* $out/share/dotnet
|
||||
for cmd in coreconsole corerun createdump crossgen ilasm ildasm mcs superpmi; do
|
||||
ln -s $out/share/dotnet/$cmd $out/bin/$cmd
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://dotnet.github.io/core/;
|
||||
description = ".NET is a general purpose development platform";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with stdenv.lib.maintainers; [ obadz ];
|
||||
license = stdenv.lib.licenses.mit;
|
||||
broken = true; # CoreCLR has proven to be very difficult to package. PRs welcome if someone wants to shave that yak.
|
||||
maintainers = with maintainers; [ kuznero ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,81 +1,71 @@
|
||||
{ stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm_4, makeWrapper }:
|
||||
{ stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.23.0";
|
||||
name = "crystal-${version}-1";
|
||||
arch =
|
||||
{
|
||||
"x86_64-linux" = "linux-x86_64";
|
||||
"i686-linux" = "linux-i686";
|
||||
"x86_64-darwin" = "darwin-x86_64";
|
||||
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
|
||||
|
||||
prebuiltBinary = fetchurl {
|
||||
url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-1-${arch}.tar.gz";
|
||||
sha256 =
|
||||
{
|
||||
"x86_64-linux" = "0nhs7swbll8hrk15kmmywngkhij80x62axiskb1gjmiwvzhlh0qx";
|
||||
"i686-linux" = "03xp8d3lqflzzm26lpdn4yavj87qzgd6xyrqxp2pn9ybwrq8fx8a";
|
||||
"x86_64-darwin" = "1prz6c1gs8z7dgpdy2id2mjn1c8f5p2bf9b39985bav448njbyjz";
|
||||
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
|
||||
};
|
||||
name = "crystal-${version}";
|
||||
version = "0.23.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/crystal-lang/crystal/archive/${version}.tar.gz";
|
||||
sha256 = "05ymwmjkl1b4m888p725kybpiap5ag2vj8l07d59j02inm5r0rcv";
|
||||
sha256 = "8cf1b9a4eab29fca2f779ea186ae18f7ce444ce189c621925fa1a0c61dd5ff55";
|
||||
};
|
||||
|
||||
prebuiltName = "crystal-0.23.0-1";
|
||||
prebuiltSrc = let arch = {
|
||||
"x86_64-linux" = "linux-x86_64";
|
||||
"i686-linux" = "linux-i686";
|
||||
"x86_64-darwin" = "darwin-x86_64";
|
||||
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
|
||||
in fetchurl {
|
||||
url = "https://github.com/crystal-lang/crystal/releases/download/0.23.0/${prebuiltName}-${arch}.tar.gz";
|
||||
sha256 = {
|
||||
"x86_64-linux" = "0nhs7swbll8hrk15kmmywngkhij80x62axiskb1gjmiwvzhlh0qx";
|
||||
"i686-linux" = "03xp8d3lqflzzm26lpdn4yavj87qzgd6xyrqxp2pn9ybwrq8fx8a";
|
||||
"x86_64-darwin" = "1prz6c1gs8z7dgpdy2id2mjn1c8f5p2bf9b39985bav448njbyjz";
|
||||
}."${stdenv.system}";
|
||||
};
|
||||
|
||||
srcs = [ src prebuiltSrc ];
|
||||
|
||||
# crystal on Darwin needs libiconv to build
|
||||
buildInputs = [
|
||||
boehmgc libatomic_ops pcre libevent llvm_4 makeWrapper
|
||||
libs = [
|
||||
boehmgc libatomic_ops pcre libevent
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
libiconv
|
||||
];
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath ([
|
||||
boehmgc libatomic_ops pcre libevent
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
libiconv
|
||||
]);
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar zxf ${src}
|
||||
tar zxf ${prebuiltBinary}
|
||||
'';
|
||||
buildInputs = libs ++ [ llvm ];
|
||||
|
||||
sourceRoot = ".";
|
||||
libPath = stdenv.lib.makeLibraryPath libs;
|
||||
|
||||
sourceRoot = "${name}";
|
||||
|
||||
fixPrebuiltBinary = if stdenv.isDarwin then ''
|
||||
wrapProgram $(pwd)/crystal-${version}-1/embedded/bin/crystal \
|
||||
wrapProgram ../${prebuiltName}/embedded/bin/crystal \
|
||||
--suffix DYLD_LIBRARY_PATH : $libPath
|
||||
''
|
||||
else ''
|
||||
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
crystal-${version}-1/embedded/bin/crystal
|
||||
../${prebuiltName}/embedded/bin/crystal
|
||||
patchelf --set-rpath ${ stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] } \
|
||||
crystal-${version}-1/embedded/bin/crystal
|
||||
../${prebuiltName}/embedded/bin/crystal
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
# patch the script which launches the prebuilt compiler
|
||||
substituteInPlace $(pwd)/crystal-${version}-1/bin/crystal --replace \
|
||||
"/usr/bin/env bash" "${stdenv.shell}"
|
||||
substituteInPlace $(pwd)/crystal-${version}/bin/crystal --replace \
|
||||
"/usr/bin/env bash" "${stdenv.shell}"
|
||||
|
||||
preBuild = ''
|
||||
patchShebangs bin/crystal
|
||||
patchShebangs ../${prebuiltName}/bin/crystal
|
||||
${fixPrebuiltBinary}
|
||||
|
||||
cd crystal-${version}
|
||||
make release=1 PATH="../crystal-${version}-1/bin:$PATH"
|
||||
make doc
|
||||
export PATH="$(pwd)/../${prebuiltName}/bin:$PATH"
|
||||
'';
|
||||
|
||||
makeFlags = [ "CRYSTAL_CONFIG_VERSION=${version}" "release=1" "all" "doc" ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 .build/crystal $out/bin/crystal
|
||||
wrapProgram $out/bin/crystal \
|
||||
--suffix CRYSTAL_PATH : $out/lib/crystal \
|
||||
--suffix LIBRARY_PATH : $libPath
|
||||
|
||||
install -dm755 $out/lib/crystal
|
||||
cp -r src/* $out/lib/crystal/
|
||||
|
||||
@@ -93,12 +83,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A compiled language with Ruby like syntax and type inference";
|
||||
homepage = https://crystal-lang.org/;
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = with stdenv.lib.maintainers; [ mingchuan ];
|
||||
maintainers = with stdenv.lib.maintainers; [ sifmelcara david50407 ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +1,44 @@
|
||||
{ lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python27, zlib
|
||||
{ lib, stdenv, makeWrapper, fetchurl, requireFile, patchelf, perl, ncurses, expat, python27, zlib
|
||||
, gcc48, gcc49, gcc5, gcc6
|
||||
, xorg, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
common =
|
||||
{ version, url, sha256
|
||||
args@{ gcc, version, sha256
|
||||
, url ? ""
|
||||
, name ? ""
|
||||
, developerProgram ? false
|
||||
, python ? python27
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-${version}";
|
||||
inherit (args) version;
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
inherit url sha256;
|
||||
if developerProgram then
|
||||
requireFile {
|
||||
message = ''
|
||||
This nix expression requires that ${args.name} is already part of the store.
|
||||
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the CUDA toolkit
|
||||
at https://developer.nvidia.com/cuda-toolkit, and run the following command in the download directory:
|
||||
nix-prefetch-url file://${args.name}
|
||||
'';
|
||||
inherit (args) name sha256;
|
||||
}
|
||||
else throw "cudatoolkit does not support platform ${stdenv.system}";
|
||||
else
|
||||
fetchurl {
|
||||
inherit (args) url sha256;
|
||||
};
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
outputs = [ "out" "lib" "doc" ];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
nativeBuildInputs = [ perl makeWrapper ];
|
||||
|
||||
runtimeDependencies = [
|
||||
ncurses expat python zlib glibc
|
||||
@@ -37,8 +51,8 @@ let
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
cd pkg/run_files
|
||||
sh cuda-linux64-rel-${version}-*.run --keep --noexec
|
||||
sh cuda-samples-linux-${version}-*.run --keep --noexec
|
||||
sh cuda-linux*.run --keep --noexec
|
||||
sh cuda-samples*.run --keep --noexec
|
||||
cd pkg
|
||||
'';
|
||||
|
||||
@@ -51,7 +65,11 @@ let
|
||||
patchelf \
|
||||
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
|
||||
fi
|
||||
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
|
||||
if [[ $i =~ libcudart ]]; then
|
||||
rpath2=
|
||||
else
|
||||
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
|
||||
fi
|
||||
patchelf --set-rpath $rpath2 --force-rpath $i
|
||||
done < <(find . -type f -print0)
|
||||
'';
|
||||
@@ -80,18 +98,33 @@ let
|
||||
mkdir -p $out/nix-support
|
||||
echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook
|
||||
|
||||
# Move some libraries to the lib output so that programs that
|
||||
# depend on them don't pull in this entire monstrosity.
|
||||
mkdir -p $lib/lib
|
||||
mv -v $out/lib64/libcudart* $lib/lib/
|
||||
|
||||
# Remove OpenCL libraries as they are provided by ocl-icd and driver.
|
||||
rm -f $out/lib64/libOpenCL*
|
||||
|
||||
# Set compiler for NVCC.
|
||||
wrapProgram $out/bin/nvcc \
|
||||
--prefix PATH : ${gcc}/bin
|
||||
'' + lib.optionalString (lib.versionOlder version "8.0") ''
|
||||
# Hack to fix building against recent Glibc/GCC.
|
||||
echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
cc = gcc;
|
||||
majorVersion =
|
||||
let versionParts = lib.splitString "." version;
|
||||
in "${lib.elemAt versionParts 0}.${lib.elemAt versionParts 1}";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A compiler for NVIDIA GPUs, math libraries, and tools";
|
||||
homepage = https://developer.nvidia.com/cuda-toolkit;
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://developer.nvidia.com/cuda-toolkit";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = licenses.unfree;
|
||||
};
|
||||
};
|
||||
@@ -100,32 +133,44 @@ in {
|
||||
|
||||
cudatoolkit6 = common {
|
||||
version = "6.0.37";
|
||||
url = http://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run;
|
||||
url = "http://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run";
|
||||
sha256 = "991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40";
|
||||
gcc = gcc48;
|
||||
};
|
||||
|
||||
cudatoolkit65 = common {
|
||||
version = "6.5.19";
|
||||
url = http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.19_linux_64.run;
|
||||
url = "http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.19_linux_64.run";
|
||||
sha256 = "1x9zdmk8z784d3d35vr2ak1l4h5v4jfjhpxfi9fl9dvjkcavqyaj";
|
||||
gcc = gcc48;
|
||||
};
|
||||
|
||||
cudatoolkit7 = common {
|
||||
version = "7.0.28";
|
||||
url = http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run;
|
||||
url = "http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run";
|
||||
sha256 = "1km5hpiimx11jcazg0h3mjzk220klwahs2vfqhjavpds5ff2wafi";
|
||||
gcc = gcc49;
|
||||
};
|
||||
|
||||
cudatoolkit75 = common {
|
||||
version = "7.5.18";
|
||||
url = http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run;
|
||||
url = "http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run";
|
||||
sha256 = "1v2ylzp34ijyhcxyh5p6i0cwawwbbdhni2l5l4qm21s1cx9ish88";
|
||||
gcc = gcc49;
|
||||
};
|
||||
|
||||
cudatoolkit8 = common {
|
||||
version = "8.0.61";
|
||||
url = https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run;
|
||||
url = "https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run";
|
||||
sha256 = "1i4xrsqbad283qffvysn88w2pmxzxbbby41lw0j1113z771akv4w";
|
||||
gcc = gcc5;
|
||||
};
|
||||
|
||||
cudatoolkit9 = common {
|
||||
version = "9.0.176";
|
||||
url = "https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run";
|
||||
sha256 = "0308rmmychxfa4inb1ird9bpgfppgr9yrfg1qp0val5azqik91ln";
|
||||
gcc = gcc6;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ in stdenv.mkDerivation {
|
||||
sha256 = "0dc5cjahv7lzlp92hidlh83rwgrpgb6xz2pnba2pm5xrv2pnsskl";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake pkgconfig libffi llvm_35 ]
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ cmake libffi llvm_35 ]
|
||||
++ stdenv.lib.optional doCheck perl;
|
||||
|
||||
patches = [ ./link-llvm.patch ];
|
||||
|
||||
@@ -17,18 +17,21 @@ stdenv.mkDerivation rec {
|
||||
repo = "dmd";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fm29lg8axfmzdaj0y6vg70lhwb5d9rv4aavnvdd15xjschinlcz";
|
||||
name = "dmd-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "druntime";
|
||||
rev = "v${version}";
|
||||
sha256 = "1n2qfw9kmnql0fk2nxikispqs7vh85nhvyyr00fk227n9lgnqf02";
|
||||
name = "druntime-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "phobos";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fywgds9xvjcgnqxmpwr67p3wi2m535619pvj159cgwv5y0nr3p1";
|
||||
name = "phobos-v${version}-src";
|
||||
})
|
||||
];
|
||||
|
||||
@@ -43,6 +46,7 @@ stdenv.mkDerivation rec {
|
||||
# Compile with PIC to prevent colliding modules with binutils 2.28.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=17375
|
||||
usePIC = "-fPIC";
|
||||
ROOT_HOME_DIR = "$(echo ~root)";
|
||||
|
||||
postPatch = ''
|
||||
# Ugly hack so the dlopen call has a chance to succeed.
|
||||
@@ -67,19 +71,23 @@ stdenv.mkDerivation rec {
|
||||
--replace g++ $CXX
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace dmd/src/root/port.c \
|
||||
--replace "#include <bits/mathdef.h>" "#include <complex.h>"
|
||||
''
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace dmd/src/root/port.c \
|
||||
--replace "#include <bits/mathdef.h>" "#include <complex.h>"
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace dmd/src/posix.mak \
|
||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
||||
# See https://github.com/NixOS/nixpkgs/issues/29443
|
||||
substituteInPlace phobos/std/path.d \
|
||||
--replace "\"/root" "\"${ROOT_HOME_DIR}"
|
||||
''
|
||||
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
substituteInPlace dmd/src/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
'';
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace dmd/src/posix.mak \
|
||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
||||
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
substituteInPlace dmd/src/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper unzip which ];
|
||||
buildInputs = [ curl tzdata ];
|
||||
@@ -96,7 +104,8 @@ stdenv.mkDerivation rec {
|
||||
cd ..
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
# disable check phase because some tests are not working with sandboxing
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
cd dmd
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
, makeWrapper, unzip, which
|
||||
, curl, tzdata
|
||||
, curl, tzdata, gdb, darwin
|
||||
# Versions 2.070.2 and up require a working dmd compiler to build:
|
||||
, bootstrapDmd }:
|
||||
|
||||
@@ -14,18 +14,21 @@ stdenv.mkDerivation rec {
|
||||
repo = "dmd";
|
||||
rev = "v${version}";
|
||||
sha256 = "0kq6r8rcghvzk5jcphg89l85rg734s29bssd2rcw3fygx0k9a9k5";
|
||||
name = "dmd-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "druntime";
|
||||
rev = "v${version}";
|
||||
sha256 = "0idn2v1lmp7hl637g3i7pdfj9mjk4sclkz4cm77nl8873k2fhk8j";
|
||||
name = "druntime-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "phobos";
|
||||
rev = "v${version}";
|
||||
sha256 = "1a7q5fd15yspgs5plxgx54jyrcwgzlyw3rahmz04jd2s5h56dj04";
|
||||
name = "phobos-v${version}-src";
|
||||
})
|
||||
];
|
||||
|
||||
@@ -35,6 +38,10 @@ stdenv.mkDerivation rec {
|
||||
mv dmd-v${version}-src dmd
|
||||
mv druntime-v${version}-src druntime
|
||||
mv phobos-v${version}-src phobos
|
||||
|
||||
# Remove cppa test for now because it doesn't work.
|
||||
rm dmd/test/runnable/cppa.d
|
||||
rm dmd/test/runnable/extra-files/cppb.cpp
|
||||
'';
|
||||
|
||||
# Compile with PIC to prevent colliding modules with binutils 2.28.
|
||||
@@ -69,26 +76,32 @@ stdenv.mkDerivation rec {
|
||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which ];
|
||||
nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which gdb ]
|
||||
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
]);
|
||||
|
||||
buildInputs = [ curl tzdata ];
|
||||
|
||||
# Buid and install are based on http://wiki.dlang.org/Building_DMD
|
||||
buildPhase = ''
|
||||
cd dmd
|
||||
make -f posix.mak INSTALL_DIR=$out
|
||||
make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out
|
||||
${
|
||||
let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
|
||||
"export DMD=$PWD/generated/${osname}/release/${bits}/dmd"
|
||||
}
|
||||
cd ../druntime
|
||||
make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
cd ../phobos
|
||||
make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
cd ..
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
# disable check phase because some tests are not working with sandboxing
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
cd dmd
|
||||
@@ -97,10 +110,11 @@ stdenv.mkDerivation rec {
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
|
||||
"export DMD=$PWD/generated/${osname}/release/${bits}/dmd"
|
||||
}
|
||||
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=${usePIC} DMD=$DMD BUILD=release SHARED=0
|
||||
cd ../druntime
|
||||
make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
cd ../phobos
|
||||
make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
cd ..
|
||||
'';
|
||||
|
||||
@@ -153,7 +167,7 @@ stdenv.mkDerivation rec {
|
||||
# Everything is now Boost licensed, even the backend.
|
||||
# https://github.com/dlang/dmd/pull/6680
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
53
pkgs/development/compilers/dotnet/sdk/default.nix
Normal file
53
pkgs/development/compilers/dotnet/sdk/default.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, libunwind
|
||||
, openssl
|
||||
, icu
|
||||
, libuuid
|
||||
, zlib
|
||||
, curl
|
||||
, patchelf
|
||||
}:
|
||||
|
||||
let
|
||||
rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libunwind libuuid icu openssl zlib curl ];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.0.3";
|
||||
name = "dotnet-sdk-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.3-servicing-007037/dotnet-sdk-2.0.3-servicing-007037-linux-x64.tar.gz";
|
||||
sha256 = "0kqk1f0vfdfyb9mp7d4y83airkxyixmxb7lrx0h0hym2a9661ch8";
|
||||
};
|
||||
|
||||
unpackPhase = "tar xvzf $src";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./dotnet
|
||||
patchelf --set-rpath "${rpath}" ./dotnet
|
||||
find -type f -name "*.so" -exec patchelf --set-rpath "${rpath}" {} \;
|
||||
echo -n "dotnet-sdk version: "
|
||||
./dotnet --version
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
dontPatchELF = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp -r ./ $out
|
||||
ln -s $out/dotnet $out/bin/dotnet
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://dotnet.github.io/;
|
||||
description = ".NET Core SDK 2.0.2 with .NET Core 2.0.0";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ kuznero ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchgit, libuuid, python2, iasl }:
|
||||
{ stdenv, fetchFromGitHub, libuuid, python2, iasl }:
|
||||
|
||||
let
|
||||
pythonEnv = python2.withPackages(ps: [ps.tkinter]);
|
||||
@@ -13,10 +13,11 @@ else
|
||||
edk2 = stdenv.mkDerivation {
|
||||
name = "edk2-2014-12-10";
|
||||
|
||||
src = fetchgit {
|
||||
url = git://github.com/tianocore/edk2;
|
||||
rev = "684a565a04";
|
||||
sha256 = "0s9ywb8w7xzlnmm4kwzykxkrdaw53b7pky121cc9wjkllzqwyxrb";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tianocore";
|
||||
repo = "edk2";
|
||||
rev = "vUDK2017";
|
||||
sha256 = "0sswa028644yr8fbl8j6rhrdm717fj29h4dys3ygklmjhss90a2g";
|
||||
};
|
||||
|
||||
buildInputs = [ libuuid pythonEnv];
|
||||
|
||||
@@ -1,37 +1,40 @@
|
||||
{ mkDerivation, aeson, ansi-terminal, ansi-wl-pprint, base, binary
|
||||
, bytestring, containers, directory, edit-distance, fetchgit
|
||||
, filemanip, filepath, HUnit, indents, mtl, optparse-applicative
|
||||
, parsec, pretty, process, QuickCheck, quickcheck-io
|
||||
, regex-applicative, split, stdenv, tasty, tasty-golden
|
||||
, tasty-hunit, tasty-quickcheck, text, union-find, wl-pprint
|
||||
{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
|
||||
, bytestring, Cabal, cmark, containers, directory, fetchgit
|
||||
, filepath, free, HUnit, indents, json, mtl, optparse-applicative
|
||||
, parsec, process, QuickCheck, quickcheck-io, split, stdenv, tasty
|
||||
, tasty-golden, tasty-hunit, tasty-quickcheck, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-format";
|
||||
version = "0.5.2";
|
||||
version = "0.7.0";
|
||||
src = fetchgit {
|
||||
url = "http://github.com/avh4/elm-format";
|
||||
sha256 = "0lman7h6wr75y90javcc4y1scvwgv125gqqaqvfrd5xrfmm43gg8";
|
||||
rev = "e452ed9342620e7bb0bc822983b96411d57143ef";
|
||||
sha256 = "1snl2lrrzdwgzi68agi3sdw84aslj04pzzxpm1mam9ic6dzhn3jf";
|
||||
rev = "da4b415c6a2b7e77b7d9f00beca3e45230e603fb";
|
||||
};
|
||||
isLibrary = false;
|
||||
|
||||
doHaddock = false;
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [
|
||||
aeson ansi-terminal ansi-wl-pprint base binary bytestring
|
||||
containers directory edit-distance filemanip filepath indents mtl
|
||||
optparse-applicative parsec pretty process regex-applicative split
|
||||
text
|
||||
setupHaskellDepends = [ base Cabal directory filepath process ];
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint base binary bytestring containers
|
||||
directory filepath free indents json mtl optparse-applicative
|
||||
parsec process split text
|
||||
];
|
||||
executableHaskellDepends = [ base ];
|
||||
testHaskellDepends = [
|
||||
aeson ansi-terminal ansi-wl-pprint base binary bytestring
|
||||
containers directory edit-distance filemanip filepath HUnit indents
|
||||
mtl optparse-applicative parsec pretty process QuickCheck
|
||||
quickcheck-io regex-applicative split tasty tasty-golden
|
||||
tasty-hunit tasty-quickcheck text union-find wl-pprint
|
||||
base cmark containers HUnit mtl parsec QuickCheck quickcheck-io
|
||||
split tasty tasty-golden tasty-hunit tasty-quickcheck text
|
||||
];
|
||||
jailbreak = true;
|
||||
postInstall = ''
|
||||
ln -s $out/bin/elm-format-0.18 $out/bin/elm-format
|
||||
'';
|
||||
postPatch = ''
|
||||
sed -i "s|desc <-.*||" ./Setup.hs
|
||||
sed -i "s|gitDescribe = .*|gitDescribe = \\\\\"da4b415c\\\\\"\"|" ./Setup.hs
|
||||
'';
|
||||
homepage = http://elm-lang.org;
|
||||
description = "A source code formatter for Elm";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
|
||||
@@ -1,54 +1,26 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, python, ... }:
|
||||
|
||||
{ newScope, stdenv, wrapCC, wrapCCWith, symlinkJoin }:
|
||||
let
|
||||
rev = "1.37.16";
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emscripten-fastcomp-${rev}";
|
||||
callPackage = newScope (self // {inherit stdenv;});
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kripken";
|
||||
repo = "emscripten-fastcomp";
|
||||
sha256 = "0wj9sc0gciaiidcjv6wb0qn6ks06xds7q34351masc7qpvd217by";
|
||||
inherit rev;
|
||||
self = {
|
||||
emscriptenfastcomp-unwrapped = callPackage ./emscripten-fastcomp.nix {};
|
||||
emscriptenfastcomp-wrapped = wrapCCWith {
|
||||
cc = self.emscriptenfastcomp-unwrapped;
|
||||
libc = stdenv.cc.libc;
|
||||
extraBuildCommands = ''
|
||||
# hardening flags break WASM support
|
||||
cat > $out/nix-support/add-hardening.sh
|
||||
'';
|
||||
};
|
||||
emscriptenfastcomp = symlinkJoin {
|
||||
name = "emscriptenfastcomp";
|
||||
paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
|
||||
preferLocalBuild = false;
|
||||
allowSubstitutes = true;
|
||||
postBuild = ''
|
||||
# replace unwrapped clang-3.9 binary by wrapper
|
||||
ln -sf $out/bin/clang $out/bin/clang-[0-9]*
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
srcFL = fetchFromGitHub {
|
||||
owner = "kripken";
|
||||
repo = "emscripten-fastcomp-clang";
|
||||
sha256 = "1akdgxzxhzjbhp4d14ajcrp9jrf39x004a726ly2gynqc185l4j7";
|
||||
inherit rev;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python ];
|
||||
preConfigure = ''
|
||||
cp -Lr ${srcFL} tools/clang
|
||||
chmod +w -R tools/clang
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DLLVM_TARGETS_TO_BUILD='X86;JSBackend'"
|
||||
"-DLLVM_INCLUDE_EXAMPLES=OFF"
|
||||
"-DLLVM_INCLUDE_TESTS=OFF"
|
||||
# "-DCLANG_INCLUDE_EXAMPLES=OFF"
|
||||
"-DCLANG_INCLUDE_TESTS=OFF"
|
||||
] ++ (stdenv.lib.optional stdenv.isLinux
|
||||
# necessary for clang to find crtend.o
|
||||
"-DGCC_INSTALL_PREFIX=${gcc}"
|
||||
);
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit gcc;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/kripken/emscripten-fastcomp;
|
||||
description = "Emscripten LLVM";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ qknight matthewbauer ];
|
||||
license = stdenv.lib.licenses.ncsa;
|
||||
};
|
||||
}
|
||||
in self
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, python, ... }:
|
||||
|
||||
let
|
||||
rev = "1.37.16";
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emscripten-fastcomp-${rev}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kripken";
|
||||
repo = "emscripten-fastcomp";
|
||||
sha256 = "0wj9sc0gciaiidcjv6wb0qn6ks06xds7q34351masc7qpvd217by";
|
||||
inherit rev;
|
||||
};
|
||||
|
||||
srcFL = fetchFromGitHub {
|
||||
owner = "kripken";
|
||||
repo = "emscripten-fastcomp-clang";
|
||||
sha256 = "1akdgxzxhzjbhp4d14ajcrp9jrf39x004a726ly2gynqc185l4j7";
|
||||
inherit rev;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python ];
|
||||
preConfigure = ''
|
||||
cp -Lr ${srcFL} tools/clang
|
||||
chmod +w -R tools/clang
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DLLVM_TARGETS_TO_BUILD='X86;JSBackend'"
|
||||
"-DLLVM_INCLUDE_EXAMPLES=OFF"
|
||||
"-DLLVM_INCLUDE_TESTS=OFF"
|
||||
# "-DCLANG_INCLUDE_EXAMPLES=OFF"
|
||||
"-DCLANG_INCLUDE_TESTS=OFF"
|
||||
] ++ (stdenv.lib.optional stdenv.isLinux
|
||||
# necessary for clang to find crtend.o
|
||||
"-DGCC_INSTALL_PREFIX=${gcc}"
|
||||
);
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit gcc;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/kripken/emscripten-fastcomp;
|
||||
description = "Emscripten LLVM";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ qknight matthewbauer ];
|
||||
license = stdenv.lib.licenses.ncsa;
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, fetchFromGitHub, glib, glibc, git,
|
||||
rlwrap, curl, pkgconfig, perl, makeWrapper, tzdata, ncurses,
|
||||
libX11, pango, cairo, gtk2, gdk_pixbuf, gtkglext,
|
||||
mesa, libXmu, libXt, libICE, libSM }:
|
||||
mesa_glu, libXmu, libXt, libICE, libSM }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "factor-lang-${version}";
|
||||
@@ -21,9 +21,10 @@ stdenv.mkDerivation rec {
|
||||
name = "factorimage";
|
||||
};
|
||||
|
||||
buildInputs = [ git rlwrap curl pkgconfig perl makeWrapper
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ git rlwrap curl perl makeWrapper
|
||||
libX11 pango cairo gtk2 gdk_pixbuf gtkglext
|
||||
mesa libXmu libXt libICE libSM ];
|
||||
mesa_glu libXmu libXt libICE libSM ];
|
||||
|
||||
buildPhase = ''
|
||||
make $(bash ./build-support/factor.sh make-target) GIT_LABEL=heads/master-${rev}
|
||||
@@ -50,7 +51,7 @@ stdenv.mkDerivation rec {
|
||||
# to be a generic solution here.
|
||||
find $(echo ${stdenv.lib.makeLibraryPath [
|
||||
glib libX11 pango cairo gtk2 gdk_pixbuf gtkglext
|
||||
mesa libXmu libXt libICE libSM ]} | sed -e 's#:# #g') -name \*.so.\* > $TMPDIR/so.lst
|
||||
mesa_glu libXmu libXt libICE libSM ]} | sed -e 's#:# #g') -name \*.so.\* > $TMPDIR/so.lst
|
||||
|
||||
(echo $(cat $TMPDIR/so.lst | wc -l) "libs found in cache \`/etc/ld.so.cache'";
|
||||
for l in $(<$TMPDIR/so.lst);
|
||||
@@ -71,7 +72,7 @@ stdenv.mkDerivation rec {
|
||||
wrapProgram $out/bin/factor --prefix LD_LIBRARY_PATH : \
|
||||
"${stdenv.lib.makeLibraryPath [ glib
|
||||
libX11 pango cairo gtk2 gdk_pixbuf gtkglext
|
||||
mesa libXmu libXt libICE libSM ]}"
|
||||
mesa_glu libXmu libXt libICE libSM ]}"
|
||||
|
||||
sed -ie 's#/bin/.factor-wrapped#/lib/factor/factor#g' $out/bin/factor
|
||||
mv $out/bin/.factor-wrapped $out/lib/factor/factor
|
||||
|
||||
@@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0mvmvwwpl4zq0yvgzdizww8l9azvlrc82xm32nz1fi1nw8x5qfqk";
|
||||
};
|
||||
|
||||
buildInputs = [ mono pkgconfig dotnetbuildhelpers autoconf automake which ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ mono dotnetbuildhelpers autoconf automake which ];
|
||||
|
||||
configurePhase = ''
|
||||
sed -i '988d' src/FSharpSource.targets
|
||||
|
||||
@@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0rfkrk4mzi4w54mfqilvng9ar5swhmnwhsyjc54rx3fd0np3jiyl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [
|
||||
pkgconfig
|
||||
autoconf
|
||||
automake
|
||||
which
|
||||
|
||||
@@ -1,78 +1,30 @@
|
||||
{ stdenv, fetchFromGitHub, mono, fsharp, dotnetPackages, z3, ocamlPackages, openssl, makeWrapper, pkgconfig, file }:
|
||||
{ stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fstar-${version}";
|
||||
version = "0.9.4.0";
|
||||
version = "0.9.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FStarLang";
|
||||
repo = "FStar";
|
||||
rev = "v${version}";
|
||||
sha256 = "130779p5plsgvz0dkcqycns3vwrvyfl138nq2xdhd3rkdsbyyvb7";
|
||||
sha256 = "1pi2ny3kpmvm85x8w98anhjf0hp0wccc51m7v697qypn5cl4ydqk";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = with ocamlPackages; [
|
||||
mono fsharp z3 dotnetPackages.FsLexYacc ocaml findlib ocaml_batteries
|
||||
zarith camlp4 yojson pprint openssl pkgconfig file
|
||||
z3 ocaml findlib ocaml_batteries menhir stdint
|
||||
zarith camlp4 yojson pprint
|
||||
];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace src/Makefile --replace "\$(RUNTIME) VS/.nuget/NuGet.exe" "true" \
|
||||
--replace Darwin xyz
|
||||
substituteInPlace src/VS/.nuget/NuGet.targets --replace "mono" "true"
|
||||
|
||||
# Fails with bad interpreter otherwise
|
||||
patchShebangs src/tools
|
||||
patchShebangs bin
|
||||
|
||||
export FSharpTargetsPath="$(dirname $(pkg-config FSharp.Core --variable=Libraries))/Microsoft.FSharp.Targets"
|
||||
# remove hardcoded windows paths
|
||||
sed -i '/<FSharpTargetsPath/d' src/*/*.fsproj
|
||||
|
||||
mkdir -p src/VS/packages/FsLexYacc.6.1.0
|
||||
ln -s ${dotnetPackages.FsLexYacc}/lib/dotnet/FsLexYacc src/VS/packages/FsLexYacc.6.1.0/build
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"FSYACC=${dotnetPackages.FsLexYacc}/bin/fsyacc"
|
||||
"FSLEX=${dotnetPackages.FsLexYacc}/bin/fslex"
|
||||
"NUGET=true"
|
||||
"PREFIX=$(out)"
|
||||
];
|
||||
|
||||
buildFlags = "-C src";
|
||||
|
||||
# Now that the .NET fstar.exe is built, use it to build the native OCaml binary
|
||||
postBuild = ''
|
||||
patchShebangs bin/fstar.exe
|
||||
|
||||
# Workaround for fsharp/fsharp#419
|
||||
cp ${fsharp}/lib/mono/4.5/FSharp.Core.dll bin/
|
||||
|
||||
# Use the built .NET binary to extract the sources of itself from F* to OCaml
|
||||
make ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} \
|
||||
$makeFlags "''${makeFlagsArray[@]}" \
|
||||
ocaml -C src
|
||||
|
||||
# Build the extracted OCaml sources
|
||||
make ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} \
|
||||
$makeFlags "''${makeFlagsArray[@]}" \
|
||||
-C src/ocaml-output
|
||||
'';
|
||||
|
||||
# https://github.com/FStarLang/FStar/issues/676
|
||||
doCheck = false;
|
||||
|
||||
preCheck = "ulimit -s unlimited";
|
||||
|
||||
# Basic test suite:
|
||||
#checkFlags = "VERBOSE=y -C examples";
|
||||
|
||||
# Complete, but heavyweight test suite:
|
||||
checkTarget = "regressions";
|
||||
checkFlags = "VERBOSE=y -C src";
|
||||
buildFlags = "-C src/ocaml-output";
|
||||
|
||||
installFlags = "-C src/ocaml-output";
|
||||
|
||||
@@ -85,5 +37,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://www.fstar-lang.org;
|
||||
license = licenses.asl20;
|
||||
platforms = with platforms; darwin ++ linux;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ autoconf ];
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out --enable-single-host
|
||||
./configure --prefix=$out
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
{ stdenv, fetchurl, fetchgit, git, openssl, autoconf, pkgs }:
|
||||
|
||||
# TODO: distinct packages for gambit-release and gambit-devel
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gambit-${version}";
|
||||
version = "4.8.8-f3ffeb6";
|
||||
version = "4.8.8-300db59";
|
||||
bootstrap = import ./bootstrap.nix ( pkgs );
|
||||
|
||||
# devver = "4_8_8";
|
||||
# src = fetchurl {
|
||||
# url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${version}-devel.tgz";
|
||||
# sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
|
||||
# };
|
||||
src = fetchgit {
|
||||
url = "https://github.com/feeley/gambit.git";
|
||||
rev = "f3ffeb695aeea80c18c1b9ef276b57898c780dca";
|
||||
sha256 = "1lqixsrgk9z2gj6z1nkys0pfd3m5zjxrp3gvqn2wpr9h7hjb8x06";
|
||||
rev = "300db59e1d3b66bcd597f617849df0274d2a4472";
|
||||
sha256 = "1mhy49lasakgvdaswkxasdssik11lx3hfx4h1gs2b6881488ssdp";
|
||||
};
|
||||
|
||||
buildInputs = [ openssl git autoconf bootstrap ];
|
||||
@@ -28,6 +25,8 @@ stdenv.mkDerivation rec {
|
||||
--enable-absolute-shared-libs # Yes, NixOS will want an absolute path, and fix it.
|
||||
--enable-poll
|
||||
--enable-openssl
|
||||
--enable-default-runtime-options="f8,-8,t8" # Default to UTF-8 for source and all I/O
|
||||
#--enable-debug # Nope: enables plenty of good stuff, but also the costly console.log
|
||||
|
||||
#--enable-multiple-versions # Nope, NixOS already does version multiplexing
|
||||
#--enable-guide
|
||||
@@ -49,15 +48,15 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildPhase = ''
|
||||
# Make bootstrap compiler, from release bootstrap
|
||||
mkdir -p boot/wip-compiler &&
|
||||
cp -rp ${bootstrap}/. boot/wip-compiler/. &&
|
||||
mkdir -p boot &&
|
||||
cp -rp ${bootstrap}/. boot/. &&
|
||||
chmod -R u+w boot &&
|
||||
cd boot/wip-compiler && \
|
||||
cp ../../gsc/makefile.in ../../gsc/*.scm gsc && \
|
||||
(cd gsc && make bootclean ) &&
|
||||
make bootstrap &&
|
||||
cd ../.. &&
|
||||
cp boot/wip-compiler/gsc/gsc gsc-boot &&
|
||||
cd boot &&
|
||||
cp ../gsc/makefile.in ../gsc/*.scm gsc && # */
|
||||
./configure &&
|
||||
for i in lib gsi gsc ; do (cd $i ; make ) ; done &&
|
||||
cd .. &&
|
||||
cp boot/gsc/gsc gsc-boot &&
|
||||
|
||||
# Now use the bootstrap compiler to build the real thing!
|
||||
make -j2 from-scratch
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langJava ? false
|
||||
, langAda ? false
|
||||
@@ -20,7 +20,7 @@
|
||||
, enableMultilib ? false
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, crossStageStatic ? false
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
@@ -71,62 +71,60 @@ let version = "4.5.4";
|
||||
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||
gccMode = targetPlatform.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
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode;
|
||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||
|
||||
/* Cross-gcc settings */
|
||||
crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt");
|
||||
|
||||
crossConfigureFlags =
|
||||
platformFlags +
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
|
||||
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
|
||||
(if crossMingw && crossStageStatic then
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --with-gcc" +
|
||||
" --with-gnu-as" +
|
||||
" --with-gnu-ld" +
|
||||
" --with-gnu-ld" +
|
||||
" --disable-shared" +
|
||||
" --disable-nls" +
|
||||
" --disable-debug" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-threads=win32" +
|
||||
" --disable-win32-registry"
|
||||
else if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libmudflap " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-shared" +
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
(if crossMingw then
|
||||
" --enable-threads=win32" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-hash-synchronization" +
|
||||
" --enable-version-specific-runtime-libs" +
|
||||
" --disable-libssp" +
|
||||
" --disable-nls" +
|
||||
" --with-dwarf2"
|
||||
else
|
||||
" --enable-threads=posix" +
|
||||
" --enable-nls" +
|
||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
||||
);
|
||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||
(if crossMingw && crossStageStatic then [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
"--with-gnu-ld"
|
||||
"--disable-shared"
|
||||
"--disable-nls"
|
||||
"--disable-debug"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-threads=win32"
|
||||
"--disable-win32-registry"
|
||||
] else if crossStageStatic then [
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--without-headers"
|
||||
"--disable-threads"
|
||||
"--disable-libmudflap"
|
||||
"--disable-libgomp"
|
||||
"--disable-shared"
|
||||
"--disable-decimal-float" # libdecnumber requires libc
|
||||
] else [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
] ++
|
||||
(if crossMingw then [
|
||||
"--enable-threads=win32"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-hash-synchronization"
|
||||
"--enable-version-specific-runtime-libs"
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--with-dwarf2"
|
||||
] 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";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
@@ -148,8 +146,9 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" ] ++ optional (name != "gnat") "all";
|
||||
|
||||
outputs = if (hostPlatform.is64bit && langAda) then [ "out" "doc" ]
|
||||
else [ "out" "lib" "doc" ];
|
||||
outputs = [ "out" "man" "info" ]
|
||||
++ optional (!(hostPlatform.is64bit && langAda)) "lib";
|
||||
|
||||
setOutputFlags = false;
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
@@ -163,6 +162,7 @@ stdenv.mkDerivation ({
|
||||
# target libraries and tools.
|
||||
++ optional langAda ../gnat-cflags.patch
|
||||
++ optional langVhdl ./ghdl-ortho-cflags.patch
|
||||
++ [ ../struct-ucontext-4.5.patch ] # glibc-2.26
|
||||
;
|
||||
|
||||
postPatch =
|
||||
@@ -223,7 +223,9 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs profiledCompiler staticCompiler langJava
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
@@ -236,55 +238,78 @@ stdenv.mkDerivation ({
|
||||
++ (optional langJava boehmgc)
|
||||
++ (optionals langJava [zip unzip])
|
||||
++ (optionals javaAwtGtk ([gtk2 pkgconfig libart_lgpl] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = "
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if ppl != null then "--with-ppl=${ppl}" else ""}
|
||||
${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if hostPlatform == targetPlatform && targetPlatform.isArm
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
[
|
||||
"--with-gmp=${gmp.dev}"
|
||||
"--with-mpfr=${mpfr.dev}"
|
||||
"--with-mpc=${libmpc}"
|
||||
] ++
|
||||
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
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
||||
else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp=${gmp.dev}
|
||||
--with-mpfr=${mpfr.dev}
|
||||
--with-mpc=${libmpc}
|
||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
||||
--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"
|
||||
)
|
||||
)
|
||||
}
|
||||
${ # 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 ""}
|
||||
${platformFlags}
|
||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||
";
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
# Trick that should be taken out once we have a mips64el-linux not loongson2f
|
||||
optional (targetPlatform == hostPlatform && stdenv.system == "mips64el-linux") "--with-arch=loongson2f"
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
AR_FOR_BUILD = "ar";
|
||||
AS_FOR_BUILD = "as";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, fetchpatch, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
@@ -26,7 +26,7 @@
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, crossStageStatic ? false
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
@@ -78,7 +78,11 @@ let version = "4.8.5";
|
||||
sha256 = "01jd7pdarh54ki498g6sz64ijl9a1l5f9v8q2696aaxalvh2vwzl";
|
||||
excludes = [ "gcc/cp/ChangeLog" ];
|
||||
})]
|
||||
;
|
||||
++ [ # glibc-2.26
|
||||
../struct-ucontext-4.8.patch
|
||||
../sigsegv-not-declared.patch
|
||||
../res_state-not-declared.patch
|
||||
];
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
@@ -111,76 +115,72 @@ let version = "4.8.5";
|
||||
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||
gccMode = targetPlatform.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
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode;
|
||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||
|
||||
/* Cross-gcc settings */
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
crossConfigureFlags =
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
|
||||
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
|
||||
(if crossMingw && crossStageStatic then
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --with-gcc" +
|
||||
" --with-gnu-as" +
|
||||
" --with-gnu-ld" +
|
||||
" --with-gnu-ld" +
|
||||
" --disable-shared" +
|
||||
" --disable-nls" +
|
||||
" --disable-debug" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-threads=win32" +
|
||||
" --disable-win32-registry"
|
||||
else if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libmudflap " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-libquadmath" +
|
||||
" --disable-shared" +
|
||||
" --disable-libatomic " + # libatomic requires libc
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
(if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
|
||||
else " --with-headers=${libcCross.dev}/include") +
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
(if crossMingw then
|
||||
" --enable-threads=win32" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-hash-synchronization" +
|
||||
" --disable-libssp" +
|
||||
" --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)
|
||||
);
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||
(if crossMingw && crossStageStatic then [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
"--with-gnu-ld"
|
||||
"--disable-shared"
|
||||
"--disable-nls"
|
||||
"--disable-debug"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-threads=win32"
|
||||
"--disable-win32-registry"
|
||||
] else if crossStageStatic then [
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--without-headers"
|
||||
"--disable-threads"
|
||||
"--disable-libgomp"
|
||||
"--disable-libquadmath"
|
||||
"--disable-shared"
|
||||
"--disable-libatomic" # libatomic requires libc
|
||||
"--disable-decimal-float" # libdecnumber requires libc
|
||||
] else [
|
||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else "--with-headers=${getDev libcCross}/include")
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
] ++
|
||||
(if crossMingw then [
|
||||
"--enable-threads=win32"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-hash-synchronization"
|
||||
"--disable-libssp"
|
||||
"--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
|
||||
optionals (targetPlatform.libc == "uclibc") [
|
||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||
# and as I don't know how to pass it, I disable libgomp.
|
||||
"--disable-libgomp"
|
||||
] ++ [
|
||||
"--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";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
|
||||
@@ -265,7 +265,9 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
@@ -278,7 +280,7 @@ stdenv.mkDerivation ({
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
|
||||
@@ -298,64 +300,98 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = "
|
||||
${if hostPlatform.isSunOS then
|
||||
" --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 "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
||||
${optionalString (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl"}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if hostPlatform == targetPlatform && targetPlatform.isArm
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
[
|
||||
"--with-gmp-include=${gmp.dev}/include"
|
||||
"--with-gmp-lib=${gmp.out}/lib"
|
||||
"--with-mpfr-include=${mpfr.dev}/include"
|
||||
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||
"--with-mpc=${libmpc}"
|
||||
] ++
|
||||
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||
|
||||
# Basic configuration
|
||||
[
|
||||
"--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
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
||||
else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp-include=${gmp.dev}/include
|
||||
--with-gmp-lib=${gmp.out}/lib
|
||||
--with-mpfr-include=${mpfr.dev}/include
|
||||
--with-mpfr-lib=${mpfr.out}/lib
|
||||
--with-mpc=${libmpc}
|
||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
||||
--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 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 ""}
|
||||
${platformFlags}
|
||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||
";
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
# Cross-compilation
|
||||
optional (targetPlatform == hostPlatform) (
|
||||
let incDir = if hostPlatform.isDarwin
|
||||
then "${darwin.usr-include}"
|
||||
else "${getDev stdenv.cc.libc}/include";
|
||||
in "--with-native-system-header-dir=${incDir}"
|
||||
) ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
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"
|
||||
]
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
@@ -368,7 +404,8 @@ stdenv.mkDerivation ({
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
crossAttrs = {
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
AR_FOR_BUILD = "ar";
|
||||
AS_FOR_BUILD = "as";
|
||||
LD_FOR_BUILD = "ld";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
@@ -26,7 +26,7 @@
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, crossStageStatic ? false
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
@@ -72,6 +72,7 @@ let version = "4.9.4";
|
||||
# target libraries and tools.
|
||||
++ optional langAda ../gnat-cflags.patch
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ [ ../struct-ucontext.patch ../struct-sigaltstack-4.9.patch ] # glibc-2.26
|
||||
;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
@@ -105,81 +106,79 @@ let version = "4.9.4";
|
||||
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||
gccMode = targetPlatform.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
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode;
|
||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||
|
||||
/* Cross-gcc settings */
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
crossConfigureFlags =
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
|
||||
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
|
||||
(if crossMingw && crossStageStatic then
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --with-gcc" +
|
||||
" --with-gnu-as" +
|
||||
" --with-gnu-ld" +
|
||||
" --with-gnu-ld" +
|
||||
" --disable-shared" +
|
||||
" --disable-nls" +
|
||||
" --disable-debug" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-threads=win32" +
|
||||
" --disable-win32-registry"
|
||||
else if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-libquadmath" +
|
||||
" --disable-shared" +
|
||||
" --disable-libatomic " + # libatomic requires libc
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
(if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
|
||||
else " --with-headers=${libcCross.dev}/include") +
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
(if crossMingw then
|
||||
" --enable-threads=win32" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-hash-synchronization" +
|
||||
" --disable-libssp" +
|
||||
" --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
|
||||
# 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)
|
||||
);
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||
(if crossMingw && crossStageStatic then [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
"--with-gnu-ld"
|
||||
"--disable-shared"
|
||||
"--disable-nls"
|
||||
"--disable-debug"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-threads=win32"
|
||||
"--disable-win32-registry"
|
||||
] else if crossStageStatic then [
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--without-headers"
|
||||
"--disable-threads"
|
||||
"--disable-libgomp"
|
||||
"--disable-libquadmath"
|
||||
"--disable-shared"
|
||||
"--disable-libatomic" # libatomic requires libc
|
||||
"--disable-decimal-float" # libdecnumber requires libc
|
||||
] else [
|
||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else "--with-headers=${getDev libcCross}/include")
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
] ++
|
||||
(if crossMingw then [
|
||||
"--enable-threads=win32"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-hash-synchronization"
|
||||
"--disable-libssp"
|
||||
"--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
|
||||
optionals (targetPlatform.libc == "uclibc") [
|
||||
# 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"
|
||||
] ++ [
|
||||
"--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";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
in
|
||||
|
||||
@@ -261,7 +260,9 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
@@ -274,7 +275,7 @@ stdenv.mkDerivation ({
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
|
||||
@@ -298,62 +299,97 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = "
|
||||
${if hostPlatform.isSunOS then
|
||||
" --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 "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
||||
${optionalString (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl"}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if hostPlatform == targetPlatform && targetPlatform.isArm
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
[
|
||||
"--with-gmp-include=${gmp.dev}/include"
|
||||
"--with-gmp-lib=${gmp.out}/lib"
|
||||
"--with-mpfr=${mpfr.dev}"
|
||||
"--with-mpc=${libmpc}"
|
||||
] ++
|
||||
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||
|
||||
# Basic configuration
|
||||
[
|
||||
"--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}" ++
|
||||
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
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
||||
else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp=${gmp.dev}
|
||||
--with-mpfr=${mpfr.dev}
|
||||
--with-mpc=${libmpc}
|
||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
||||
--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 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 ""}
|
||||
${platformFlags}
|
||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||
";
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
# Cross-compilation
|
||||
optional (targetPlatform == hostPlatform) (
|
||||
let incDir = if hostPlatform.isDarwin
|
||||
then "${darwin.usr-include}"
|
||||
else "${getDev stdenv.cc.libc}/include";
|
||||
in "--with-native-system-header-dir=${incDir}"
|
||||
) ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
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"
|
||||
]
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
@@ -366,6 +402,7 @@ stdenv.mkDerivation ({
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
AR_FOR_BUILD = "ar";
|
||||
AS_FOR_BUILD = "as";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
@@ -26,12 +26,11 @@
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, crossStageStatic ? false
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, gnused ? null
|
||||
, binutils ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
, buildPlatform, hostPlatform, targetPlatform
|
||||
@@ -51,7 +50,7 @@ assert libelf != null -> zlib != null;
|
||||
assert hostPlatform.isDarwin -> gnused != null;
|
||||
|
||||
# Need c++filt on darwin
|
||||
assert hostPlatform.isDarwin -> binutils != null;
|
||||
assert hostPlatform.isDarwin -> targetPackages.stdenv.cc.bintools or null != null;
|
||||
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
@@ -59,8 +58,8 @@ assert langGo -> langCC;
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "5.4.0";
|
||||
sha256 = "0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0";
|
||||
let version = "5.5.0";
|
||||
sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k";
|
||||
|
||||
# Whether building a cross-compiler for GNU/Hurd.
|
||||
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
|
||||
@@ -111,81 +110,79 @@ let version = "5.4.0";
|
||||
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||
gccMode = targetPlatform.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
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode;
|
||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||
|
||||
/* Cross-gcc settings */
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
crossConfigureFlags =
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
|
||||
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
|
||||
(if crossMingw && crossStageStatic then
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --with-gcc" +
|
||||
" --with-gnu-as" +
|
||||
" --with-gnu-ld" +
|
||||
" --with-gnu-ld" +
|
||||
" --disable-shared" +
|
||||
" --disable-nls" +
|
||||
" --disable-debug" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-threads=win32" +
|
||||
" --disable-win32-registry"
|
||||
else if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-libquadmath" +
|
||||
" --disable-shared" +
|
||||
" --disable-libatomic " + # libatomic requires libc
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else " --with-headers=${getDev libcCross}/include") +
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
(if crossMingw then
|
||||
" --enable-threads=win32" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-hash-synchronization" +
|
||||
" --disable-libssp" +
|
||||
" --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
|
||||
# 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)
|
||||
);
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||
(if crossMingw && crossStageStatic then [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
"--with-gnu-ld"
|
||||
"--disable-shared"
|
||||
"--disable-nls"
|
||||
"--disable-debug"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-threads=win32"
|
||||
"--disable-win32-registry"
|
||||
] else if crossStageStatic then [
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--without-headers"
|
||||
"--disable-threads"
|
||||
"--disable-libgomp"
|
||||
"--disable-libquadmath"
|
||||
"--disable-shared"
|
||||
"--disable-libatomic" # libatomic requires libc
|
||||
"--disable-decimal-float" # libdecnumber requires libc
|
||||
] else [
|
||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else "--with-headers=${getDev libcCross}/include")
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
] ++
|
||||
(if crossMingw then [
|
||||
"--enable-threads=win32"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-hash-synchronization"
|
||||
"--disable-libssp"
|
||||
"--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
|
||||
optionals (targetPlatform.libc == "uclibc") [
|
||||
# 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"
|
||||
] ++ [
|
||||
"--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";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
in
|
||||
|
||||
@@ -198,12 +195,11 @@ stdenv.mkDerivation ({
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
# FIXME stackprotector needs gcc 4.9 in bootstrap tools
|
||||
hardeningDisable = [ "stackprotector" "format" ];
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
inherit patches;
|
||||
|
||||
@@ -280,7 +276,9 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
@@ -292,7 +290,7 @@ stdenv.mkDerivation ({
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
++ (optionals (buildPlatform != hostPlatform) [buildPackages.stdenv.cc])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
@@ -300,7 +298,7 @@ stdenv.mkDerivation ({
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
++ (optional hostPlatform.isDarwin binutils)
|
||||
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
|
||||
;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
@@ -315,63 +313,93 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = "
|
||||
${if hostPlatform.isSunOS then
|
||||
" --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 "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if hostPlatform == targetPlatform && targetPlatform.isArm
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
[
|
||||
"--with-gmp-include=${gmp.dev}/include"
|
||||
"--with-gmp-lib=${gmp.out}/lib"
|
||||
"--with-mpfr-include=${mpfr.dev}/include"
|
||||
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||
"--with-mpc=${libmpc}"
|
||||
] ++
|
||||
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||
|
||||
# Basic configuration
|
||||
[
|
||||
"--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
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
||||
else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp-include=${gmp.dev}/include
|
||||
--with-gmp-lib=${gmp.out}/lib
|
||||
--with-mpfr-include=${mpfr.dev}/include
|
||||
--with-mpfr-lib=${mpfr.out}/lib
|
||||
--with-mpc=${libmpc}
|
||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
||||
--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 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 ""}
|
||||
${platformFlags}
|
||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||
";
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
# Cross-compilation
|
||||
optional (targetPlatform == hostPlatform) (
|
||||
let incDir = if hostPlatform.isDarwin
|
||||
then "${darwin.usr-include}"
|
||||
else "${getDev stdenv.cc.libc}/include";
|
||||
in "--with-native-system-header-dir=${incDir}"
|
||||
) ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
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"
|
||||
]
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
@@ -384,6 +412,7 @@ stdenv.mkDerivation ({
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
AR_FOR_BUILD = "ar";
|
||||
AS_FOR_BUILD = "as";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
@@ -26,12 +26,11 @@
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, crossStageStatic ? false
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, gnused ? null
|
||||
, binutils ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
, buildPlatform, hostPlatform, targetPlatform
|
||||
@@ -50,7 +49,7 @@ assert libelf != null -> zlib != null;
|
||||
assert hostPlatform.isDarwin -> gnused != null;
|
||||
|
||||
# Need c++filt on darwin
|
||||
assert hostPlatform.isDarwin -> binutils != null;
|
||||
assert hostPlatform.isDarwin -> targetPackages.stdenv.cc.bintools or null != null;
|
||||
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
@@ -72,7 +71,10 @@ let version = "6.4.0";
|
||||
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||
# target libraries and tools.
|
||||
++ optional langAda ../gnat-cflags.patch
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ [ ../struct-ucontext.patch ../struct-sigaltstack.patch ] # glibc-2.26
|
||||
++ optional langJava [ ../struct-ucontext-libjava.patch ] # glibc-2.26
|
||||
;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
@@ -105,77 +107,75 @@ let version = "6.4.0";
|
||||
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||
gccMode = targetPlatform.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
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode;
|
||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||
|
||||
/* Cross-gcc settings */
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
crossConfigureFlags =
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
|
||||
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
|
||||
(if crossMingw && crossStageStatic then
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --with-gcc" +
|
||||
" --with-gnu-as" +
|
||||
" --with-gnu-ld" +
|
||||
" --with-gnu-ld" +
|
||||
" --disable-shared" +
|
||||
" --disable-nls" +
|
||||
" --disable-debug" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-threads=win32" +
|
||||
" --disable-win32-registry"
|
||||
else if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-libquadmath" +
|
||||
" --disable-shared" +
|
||||
" --disable-libatomic " + # libatomic requires libc
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else " --with-headers=${getDev libcCross}/include") +
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
(if crossMingw then
|
||||
" --enable-threads=win32" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-hash-synchronization" +
|
||||
" --disable-libssp" +
|
||||
" --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
|
||||
# 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)
|
||||
);
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||
(if crossMingw && crossStageStatic then [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
"--with-gnu-ld"
|
||||
"--disable-shared"
|
||||
"--disable-nls"
|
||||
"--disable-debug"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-threads=win32"
|
||||
"--disable-win32-registry"
|
||||
] else if crossStageStatic then [
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--without-headers"
|
||||
"--disable-threads"
|
||||
"--disable-libgomp"
|
||||
"--disable-libquadmath"
|
||||
"--disable-shared"
|
||||
"--disable-libatomic" # libatomic requires libc
|
||||
"--disable-decimal-float" # libdecnumber requires libc
|
||||
] else [
|
||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else "--with-headers=${getDev libcCross}/include")
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
] ++
|
||||
(if crossMingw then [
|
||||
"--enable-threads=win32"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-hash-synchronization"
|
||||
"--disable-libssp"
|
||||
"--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
|
||||
optionals (targetPlatform.libc == "uclibc") [
|
||||
# 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"
|
||||
] ++ [
|
||||
"--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";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
|
||||
@@ -198,7 +198,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit patches;
|
||||
|
||||
outputs = [ "out" "lib" "man" "info" ];
|
||||
outputs = if langJava || langGo then ["out" "man" "info"]
|
||||
else [ "out" "lib" "man" "info" ];
|
||||
setOutputFlags = false;
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
@@ -273,7 +274,9 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
@@ -285,14 +288,14 @@ stdenv.mkDerivation ({
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
++ (optional hostPlatform.isDarwin binutils)
|
||||
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
|
||||
;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
@@ -302,80 +305,114 @@ stdenv.mkDerivation ({
|
||||
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
|
||||
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
|
||||
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
|
||||
'';
|
||||
''
|
||||
+ stdenv.lib.optionalString (langJava || langGo) ''
|
||||
export lib=$out;
|
||||
''
|
||||
;
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = "
|
||||
${if hostPlatform.isSunOS then
|
||||
" --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 "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if hostPlatform == targetPlatform && targetPlatform.isArm
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
[
|
||||
"--with-gmp-include=${gmp.dev}/include"
|
||||
"--with-gmp-lib=${gmp.out}/lib"
|
||||
"--with-mpfr-include=${mpfr.dev}/include"
|
||||
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||
"--with-mpc=${libmpc}"
|
||||
] ++
|
||||
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||
|
||||
# Basic configuration
|
||||
[
|
||||
"--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
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
||||
else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp-include=${gmp.dev}/include
|
||||
--with-gmp-lib=${gmp.out}/lib
|
||||
--with-mpfr-include=${mpfr.dev}/include
|
||||
--with-mpfr-lib=${mpfr.out}/lib
|
||||
--with-mpc=${libmpc}
|
||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
||||
--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 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 ""}
|
||||
${platformFlags}
|
||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||
";
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
# Cross compilation
|
||||
optional (targetPlatform == hostPlatform) (
|
||||
let incDir = if hostPlatform.isDarwin
|
||||
then "${darwin.usr-include}"
|
||||
else "${getDev stdenv.cc.libc}/include";
|
||||
in "--with-native-system-header-dir=${incDir}"
|
||||
) ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
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"
|
||||
]
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
buildFlags = if bootstrap then
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
|
||||
else "";
|
||||
buildFlags =
|
||||
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
AR_FOR_BUILD = "ar";
|
||||
AS_FOR_BUILD = "as";
|
||||
@@ -526,4 +563,10 @@ stdenv.mkDerivation ({
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
|
||||
// optionalAttrs (langJava) {
|
||||
postFixup = ''
|
||||
target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
|
||||
patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
|
||||
'';}
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
@@ -26,12 +26,11 @@
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, crossStageStatic ? false
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, gnused ? null
|
||||
, binutils ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
, flex ? null
|
||||
@@ -51,7 +50,7 @@ assert libelf != null -> zlib != null;
|
||||
assert hostPlatform.isDarwin -> gnused != null;
|
||||
|
||||
# Need c++filt on darwin
|
||||
assert hostPlatform.isDarwin -> binutils != null;
|
||||
assert hostPlatform.isDarwin -> targetPackages.stdenv.cc.bintools or null != null;
|
||||
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
@@ -59,7 +58,7 @@ assert langGo -> langCC;
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "7.1.0";
|
||||
let version = "7.2.0";
|
||||
|
||||
# Whether building a cross-compiler for GNU/Hurd.
|
||||
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
|
||||
@@ -106,82 +105,79 @@ let version = "7.1.0";
|
||||
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||
gccMode = targetPlatform.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
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode;
|
||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||
|
||||
/* Cross-gcc settings */
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
crossConfigureFlags =
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
|
||||
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
|
||||
(if crossMingw && crossStageStatic then
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --with-gcc" +
|
||||
" --with-gnu-as" +
|
||||
" --with-gnu-ld" +
|
||||
" --with-gnu-ld" +
|
||||
" --disable-shared" +
|
||||
" --disable-nls" +
|
||||
" --disable-debug" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-threads=win32" +
|
||||
" --disable-win32-registry"
|
||||
else if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-libquadmath" +
|
||||
" --disable-shared" +
|
||||
" --disable-libatomic " + # libatomic requires libc
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else " --with-headers=${getDev libcCross}/include") +
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
(if crossMingw then
|
||||
" --enable-threads=win32" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-hash-synchronization" +
|
||||
" --disable-libssp" +
|
||||
" --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
|
||||
# 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)
|
||||
);
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||
(if crossMingw && crossStageStatic then [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
"--with-gnu-ld"
|
||||
"--disable-shared"
|
||||
"--disable-nls"
|
||||
"--disable-debug"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-threads=win32"
|
||||
"--disable-win32-registry"
|
||||
] else if crossStageStatic then [
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--without-headers"
|
||||
"--disable-threads"
|
||||
"--disable-libgomp"
|
||||
"--disable-libquadmath"
|
||||
"--disable-shared"
|
||||
"--disable-libatomic" # libatomic requires libc
|
||||
"--disable-decimal-float" # libdecnumber requires libc
|
||||
] else [
|
||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else "--with-headers=${getDev libcCross}/include")
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
] ++
|
||||
(if crossMingw then [
|
||||
"--enable-threads=win32"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-hash-synchronization"
|
||||
"--disable-libssp"
|
||||
"--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
|
||||
optionals (targetPlatform.libc == "uclibc") [
|
||||
# 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"
|
||||
] ++ [
|
||||
"--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";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
in
|
||||
|
||||
@@ -194,8 +190,8 @@ stdenv.mkDerivation ({
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
sha256 = "05xwps0ci7wgxh50askpa2r9p8518qxdgh6ad7pnyk7n6p13d0ca";
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "16j7i0888j2f1yp9l0nhji6cq65dy6y4nwy8868a8njbzzwavxqw";
|
||||
};
|
||||
|
||||
inherit patches;
|
||||
@@ -275,7 +271,9 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
@@ -287,14 +285,14 @@ stdenv.mkDerivation ({
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
++ (optional hostPlatform.isDarwin binutils)
|
||||
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
|
||||
;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
@@ -309,63 +307,93 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = "
|
||||
${if hostPlatform.isSunOS then
|
||||
" --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 "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if hostPlatform == targetPlatform && targetPlatform.isArm
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
[
|
||||
"--with-gmp-include=${gmp.dev}/include"
|
||||
"--with-gmp-lib=${gmp.out}/lib"
|
||||
"--with-mpfr-include=${mpfr.dev}/include"
|
||||
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||
"--with-mpc=${libmpc}"
|
||||
] ++
|
||||
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||
|
||||
# Basic configuration
|
||||
[
|
||||
"--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
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
||||
else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp-include=${gmp.dev}/include
|
||||
--with-gmp-lib=${gmp.out}/lib
|
||||
--with-mpfr-include=${mpfr.dev}/include
|
||||
--with-mpfr-lib=${mpfr.out}/lib
|
||||
--with-mpc=${libmpc}
|
||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
||||
--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 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 ""}
|
||||
${platformFlags}
|
||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||
";
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
# Cross-compilation
|
||||
optional (targetPlatform == hostPlatform) (
|
||||
let incDir = if hostPlatform.isDarwin
|
||||
then "${darwin.usr-include}"
|
||||
else "${getDev stdenv.cc.libc}/include";
|
||||
in "--with-native-system-header-dir=${incDir}"
|
||||
) ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
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"
|
||||
]
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
@@ -378,6 +406,7 @@ stdenv.mkDerivation ({
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
AR_FOR_BUILD = "ar";
|
||||
AS_FOR_BUILD = "as";
|
||||
|
||||
2
pkgs/development/compilers/gcc/libstdc++-hook.sh
Normal file
2
pkgs/development/compilers/gcc/libstdc++-hook.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
export NIX_CXXSTDLIB_COMPILE+="-isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)"
|
||||
export NIX_CXXSTDLIB_LINK=" -stdlib=libstdc++"
|
||||
13
pkgs/development/compilers/gcc/res_state-not-declared.patch
Normal file
13
pkgs/development/compilers/gcc/res_state-not-declared.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
index fe69430..49f5270 100644
|
||||
--- a/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
@@ -351,7 +351,7 @@ bool IsGlobalVar(uptr addr) {
|
||||
// closes within glibc. The code is a pure hack.
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
13
pkgs/development/compilers/gcc/sigsegv-not-declared.patch
Normal file
13
pkgs/development/compilers/gcc/sigsegv-not-declared.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
error: 'SIGSEGV' was not declared in this scope
|
||||
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
|
||||
index 0692eb1..472f734 100644
|
||||
--- a/libsanitizer/asan/asan_linux.cc
|
||||
+++ b/libsanitizer/asan/asan_linux.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
@@ -26,12 +26,11 @@
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, crossStageStatic ? false
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, gnused ? null
|
||||
, binutils ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
, flex ? null
|
||||
@@ -51,7 +50,7 @@ assert libelf != null -> zlib != null;
|
||||
assert hostPlatform.isDarwin -> gnused != null;
|
||||
|
||||
# Need c++filt on darwin
|
||||
assert hostPlatform.isDarwin -> binutils != null;
|
||||
assert hostPlatform.isDarwin -> targetPackages.stdenv.cc.bintools or null != null;
|
||||
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
@@ -106,82 +105,79 @@ let version = "7-20170409";
|
||||
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||
gccMode = targetPlatform.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
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode;
|
||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
|
||||
optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
|
||||
optional (gccFloat != null) "--with-float=${gccFloat}" ++
|
||||
optional (gccMode != null) "--with-mode=${gccMode}";
|
||||
|
||||
/* Cross-gcc settings */
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
crossConfigureFlags =
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
|
||||
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
|
||||
(if crossMingw && crossStageStatic then
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --with-gcc" +
|
||||
" --with-gnu-as" +
|
||||
" --with-gnu-ld" +
|
||||
" --with-gnu-ld" +
|
||||
" --disable-shared" +
|
||||
" --disable-nls" +
|
||||
" --disable-debug" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-threads=win32" +
|
||||
" --disable-win32-registry"
|
||||
else if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-libquadmath" +
|
||||
" --disable-shared" +
|
||||
" --disable-libatomic " + # libatomic requires libc
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else " --with-headers=${getDev libcCross}/include") +
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
(if crossMingw then
|
||||
" --enable-threads=win32" +
|
||||
" --enable-sjlj-exceptions" +
|
||||
" --enable-hash-synchronization" +
|
||||
" --disable-libssp" +
|
||||
" --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
|
||||
# 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)
|
||||
);
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||
(if crossMingw && crossStageStatic then [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
"--with-gnu-ld"
|
||||
"--disable-shared"
|
||||
"--disable-nls"
|
||||
"--disable-debug"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-threads=win32"
|
||||
"--disable-win32-registry"
|
||||
] else if crossStageStatic then [
|
||||
"--disable-libssp"
|
||||
"--disable-nls"
|
||||
"--without-headers"
|
||||
"--disable-threads"
|
||||
"--disable-libgomp"
|
||||
"--disable-libquadmath"
|
||||
"--disable-shared"
|
||||
"--disable-libatomic" # libatomic requires libc
|
||||
"--disable-decimal-float" # libdecnumber requires libc
|
||||
] else [
|
||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||
else "--with-headers=${getDev libcCross}/include")
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
] ++
|
||||
(if crossMingw then [
|
||||
"--enable-threads=win32"
|
||||
"--enable-sjlj-exceptions"
|
||||
"--enable-hash-synchronization"
|
||||
"--disable-libssp"
|
||||
"--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
|
||||
optionals (targetPlatform.libc == "uclibc") [
|
||||
# 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"
|
||||
] ++ [
|
||||
"--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";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
in
|
||||
|
||||
@@ -262,7 +258,9 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
@@ -274,14 +272,14 @@ stdenv.mkDerivation ({
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
++ (optional hostPlatform.isDarwin binutils)
|
||||
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
|
||||
;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
@@ -296,63 +294,93 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = "
|
||||
${if hostPlatform.isSunOS then
|
||||
" --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 "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
||||
${optionalString (isl != null) "--with-isl=${isl}"}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if hostPlatform == targetPlatform && targetPlatform.isArm
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
[
|
||||
"--with-gmp-include=${gmp.dev}/include"
|
||||
"--with-gmp-lib=${gmp.out}/lib"
|
||||
"--with-mpfr-include=${mpfr.dev}/include"
|
||||
"--with-mpfr-lib=${mpfr.out}/lib"
|
||||
"--with-mpc=${libmpc}"
|
||||
] ++
|
||||
optional (libelf != null) "--with-libelf=${libelf}" ++
|
||||
|
||||
# Basic configuration
|
||||
[
|
||||
"--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
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
|
||||
else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp-include=${gmp.dev}/include
|
||||
--with-gmp-lib=${gmp.out}/lib
|
||||
--with-mpfr-include=${mpfr.dev}/include
|
||||
--with-mpfr-lib=${mpfr.out}/lib
|
||||
--with-mpc=${libmpc}
|
||||
${if libelf != null then "--with-libelf=${libelf}" else ""}
|
||||
--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 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 ""}
|
||||
${platformFlags}
|
||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||
";
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
# Cross-compilation
|
||||
optional (targetPlatform == hostPlatform) (
|
||||
let incDir = if hostPlatform.isDarwin
|
||||
then "${darwin.usr-include}"
|
||||
else "${getDev stdenv.cc.libc}/include";
|
||||
in "--with-native-system-header-dir=${incDir}"
|
||||
) ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
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"
|
||||
]
|
||||
;
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
@@ -365,6 +393,7 @@ stdenv.mkDerivation ({
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
AR_FOR_BUILD = "ar";
|
||||
AS_FOR_BUILD = "as";
|
||||
|
||||
78
pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch
Normal file
78
pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
hand-resolved trivial conflicts for 4.9 from the upstream patch
|
||||
72edc2c02f8b4768ad660f46a1c7e2400c0a8e06
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
index 69c9c10..8e53673 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
@@ -599,8 +599,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
|
||||
return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
|
||||
}
|
||||
|
||||
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||
- struct sigaltstack *oss) {
|
||||
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||
return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
|
||||
}
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
index 6422df1..8e111d1 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "sanitizer_platform_limits_posix.h"
|
||||
|
||||
struct link_map; // Opaque type returned by dlopen().
|
||||
-struct sigaltstack;
|
||||
|
||||
namespace __sanitizer {
|
||||
// Dirent structure for getdents(). Note that this structure is different from
|
||||
@@ -28,8 +27,7 @@ struct linux_dirent;
|
||||
// Syscall wrappers.
|
||||
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||
uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
|
||||
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||
- struct sigaltstack* oss);
|
||||
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||
uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
|
||||
__sanitizer_kernel_sigaction_t *oldact);
|
||||
uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
index 891386dc..234e8c6 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
|
||||
|
||||
// Alternate stack for signal handling.
|
||||
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||
- struct sigaltstack handler_stack;
|
||||
+ stack_t handler_stack;
|
||||
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||
handler_stack.ss_sp = handler_stack_memory.data();
|
||||
handler_stack.ss_size = kHandlerStackSize;
|
||||
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
index 2ed5718..6f972ab 100644
|
||||
--- a/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
@@ -287,7 +287,7 @@ void InitializePlatform() {
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
|
||||
error: 'SIGSEGV' was not declared in this scope
|
||||
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
|
||||
index 0692eb1..472f734 100644
|
||||
--- a/libsanitizer/asan/asan_linux.cc
|
||||
+++ b/libsanitizer/asan/asan_linux.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
||||
87
pkgs/development/compilers/gcc/struct-sigaltstack.patch
Normal file
87
pkgs/development/compilers/gcc/struct-sigaltstack.patch
Normal file
@@ -0,0 +1,87 @@
|
||||
From 72edc2c02f8b4768ad660f46a1c7e2400c0a8e06 Mon Sep 17 00:00:00 2001
|
||||
From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Mon, 17 Jul 2017 19:41:08 +0000
|
||||
Subject: [PATCH] Backported from mainline 2017-07-14 Jakub
|
||||
Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/81066
|
||||
* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
|
||||
* sanitizer_common/sanitizer_linux.cc: Likewise.
|
||||
* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
|
||||
* tsan/tsan_platform_linux.cc: Likewise.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
libsanitizer/ChangeLog (REMOVED) | 11 +++++++++++
|
||||
libsanitizer/sanitizer_common/sanitizer_linux.cc | 3 +--
|
||||
libsanitizer/sanitizer_common/sanitizer_linux.h | 4 +---
|
||||
.../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
|
||||
libsanitizer/tsan/tsan_platform_linux.cc | 2 +-
|
||||
5 files changed, 15 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
index 806fcd5..5b6f186 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
@@ -605,8 +605,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
|
||||
}
|
||||
#endif
|
||||
|
||||
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||
- struct sigaltstack *oss) {
|
||||
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
|
||||
}
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
index 895bfc1..a42df57 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "sanitizer_platform_limits_posix.h"
|
||||
|
||||
struct link_map; // Opaque type returned by dlopen().
|
||||
-struct sigaltstack;
|
||||
|
||||
namespace __sanitizer {
|
||||
// Dirent structure for getdents(). Note that this structure is different from
|
||||
@@ -28,8 +27,7 @@ struct linux_dirent;
|
||||
|
||||
// Syscall wrappers.
|
||||
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||
- struct sigaltstack* oss);
|
||||
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
|
||||
__sanitizer_sigset_t *oldset);
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
index 891386dc..234e8c6 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
|
||||
|
||||
// Alternate stack for signal handling.
|
||||
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||
- struct sigaltstack handler_stack;
|
||||
+ stack_t handler_stack;
|
||||
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||
handler_stack.ss_sp = handler_stack_memory.data();
|
||||
handler_stack.ss_size = kHandlerStackSize;
|
||||
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
index 2ed5718..6f972ab 100644
|
||||
--- a/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
@@ -287,7 +287,7 @@ void InitializePlatform() {
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
--
|
||||
2.9.3
|
||||
|
||||
107
pkgs/development/compilers/gcc/struct-ucontext-4.5.patch
Normal file
107
pkgs/development/compilers/gcc/struct-ucontext-4.5.patch
Normal file
@@ -0,0 +1,107 @@
|
||||
Trivally backported the upstream commit
|
||||
b685411208e0aaa79190d54faf945763514706b8
|
||||
(different directory, some files not present, etc.)
|
||||
We only really use x86* from those, probably, so I didn't bother much.
|
||||
diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
|
||||
index bdbba4a..e84812e 100644
|
||||
--- a/gcc/config/alpha/linux-unwind.h
|
||||
+++ b/gcc/config/alpha/linux-unwind.h
|
||||
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
}
|
||||
diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
|
||||
index 77b7c23..8bf5e82 100644
|
||||
--- a/gcc/config/bfin/linux-unwind.h
|
||||
+++ b/gcc/config/bfin/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
|
||||
void *puc;
|
||||
char retcode[8];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
|
||||
index 540a0a2..29efbe3 100644
|
||||
--- a/gcc/config/i386/linux-unwind.h
|
||||
+++ b/gcc/config/i386/linux-unwind.h
|
||||
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/gcc/config/m68k/linux-unwind.h b/gcc/config/m68k/linux-unwind.h
|
||||
index 75b7cf7..f964e24 100644
|
||||
--- a/gcc/config/m68k/linux-unwind.h
|
||||
+++ b/gcc/config/m68k/linux-unwind.h
|
||||
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
/* <sys/ucontext.h> is unfortunately broken right now. */
|
||||
struct uw_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
unsigned long uc_filler[80];
|
||||
diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
|
||||
index 9a2657f..e47493d 100644
|
||||
--- a/gcc/config/pa/linux-unwind.h
|
||||
+++ b/gcc/config/pa/linux-unwind.h
|
||||
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigcontext *sc;
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *frame;
|
||||
|
||||
/* rt_sigreturn trampoline:
|
||||
diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
|
||||
index e389cac..0bf43ba 100644
|
||||
--- a/gcc/config/sh/linux-unwind.h
|
||||
+++ b/gcc/config/sh/linux-unwind.h
|
||||
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
|
||||
index 9872492..586a9d4 100644
|
||||
--- a/gcc/config/xtensa/linux-unwind.h
|
||||
+++ b/gcc/config/xtensa/linux-unwind.h
|
||||
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|
||||
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* movi a2, __NR_rt_sigreturn; syscall */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
177
pkgs/development/compilers/gcc/struct-ucontext-4.8.patch
Normal file
177
pkgs/development/compilers/gcc/struct-ucontext-4.8.patch
Normal file
@@ -0,0 +1,177 @@
|
||||
From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
|
||||
From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Tue, 4 Jul 2017 10:23:57 +0000
|
||||
Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
|
||||
|
||||
Current glibc no longer gives the ucontext_t type the tag struct
|
||||
ucontext, to conform with POSIX namespace rules. This requires
|
||||
various linux-unwind.h files in libgcc, that were previously using
|
||||
struct ucontext, to be fixed to use ucontext_t instead. This is
|
||||
similar to the removal of the struct siginfo tag from siginfo_t some
|
||||
years ago.
|
||||
|
||||
This patch changes those files to use ucontext_t instead. As the
|
||||
standard name that should be unconditionally safe, so this is not
|
||||
restricted to architectures supported by glibc, or conditioned on the
|
||||
glibc version.
|
||||
|
||||
Tested compilation together with current glibc with glibc's
|
||||
build-many-glibcs.py.
|
||||
|
||||
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
|
||||
config/alpha/linux-unwind.h (alpha_fallback_frame_state),
|
||||
config/bfin/linux-unwind.h (bfin_fallback_frame_state),
|
||||
config/i386/linux-unwind.h (x86_64_fallback_frame_state,
|
||||
x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
|
||||
uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
|
||||
config/pa/linux-unwind.h (pa32_fallback_frame_state),
|
||||
config/sh/linux-unwind.h (sh_fallback_frame_state),
|
||||
config/tilepro/linux-unwind.h (tile_fallback_frame_state),
|
||||
config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
|
||||
ucontext_t instead of struct ucontext.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
libgcc/ChangeLog (REMOVED) | 14 ++++++++++++++
|
||||
libgcc/config/aarch64/linux-unwind.h | 2 +-
|
||||
libgcc/config/alpha/linux-unwind.h | 2 +-
|
||||
libgcc/config/bfin/linux-unwind.h | 2 +-
|
||||
libgcc/config/i386/linux-unwind.h | 4 ++--
|
||||
libgcc/config/m68k/linux-unwind.h | 2 +-
|
||||
libgcc/config/nios2/linux-unwind.h | 2 +-
|
||||
libgcc/config/pa/linux-unwind.h | 2 +-
|
||||
libgcc/config/sh/linux-unwind.h | 2 +-
|
||||
libgcc/config/tilepro/linux-unwind.h | 2 +-
|
||||
libgcc/config/xtensa/linux-unwind.h | 2 +-
|
||||
11 files changed, 25 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
|
||||
index 4512efb..06de45a 100644
|
||||
--- a/libgcc/config/aarch64/linux-unwind.h
|
||||
+++ b/libgcc/config/aarch64/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe
|
||||
{
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
};
|
||||
|
||||
struct rt_sigframe *rt_;
|
||||
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
|
||||
index bdbba4a..e84812e 100644
|
||||
--- a/libgcc/config/alpha/linux-unwind.h
|
||||
+++ b/libgcc/config/alpha/linux-unwind.h
|
||||
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
}
|
||||
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
|
||||
index 77b7c23..8bf5e82 100644
|
||||
--- a/libgcc/config/bfin/linux-unwind.h
|
||||
+++ b/libgcc/config/bfin/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
|
||||
void *puc;
|
||||
char retcode[8];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
|
||||
index 540a0a2..29efbe3 100644
|
||||
--- a/libgcc/config/i386/linux-unwind.h
|
||||
+++ b/libgcc/config/i386/linux-unwind.h
|
||||
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
|
||||
index 75b7cf7..f964e24 100644
|
||||
--- a/libgcc/config/m68k/linux-unwind.h
|
||||
+++ b/libgcc/config/m68k/linux-unwind.h
|
||||
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
/* <sys/ucontext.h> is unfortunately broken right now. */
|
||||
struct uw_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
unsigned long uc_filler[80];
|
||||
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
|
||||
index 9a2657f..e47493d 100644
|
||||
--- a/libgcc/config/pa/linux-unwind.h
|
||||
+++ b/libgcc/config/pa/linux-unwind.h
|
||||
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigcontext *sc;
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *frame;
|
||||
|
||||
/* rt_sigreturn trampoline:
|
||||
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
|
||||
index e389cac..0bf43ba 100644
|
||||
--- a/libgcc/config/sh/linux-unwind.h
|
||||
+++ b/libgcc/config/sh/linux-unwind.h
|
||||
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
|
||||
index 796e976..75f8890 100644
|
||||
--- a/libgcc/config/tilepro/linux-unwind.h
|
||||
+++ b/libgcc/config/tilepro/linux-unwind.h
|
||||
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe {
|
||||
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* Return if this is not a signal handler. */
|
||||
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
|
||||
index 9872492..586a9d4 100644
|
||||
--- a/libgcc/config/xtensa/linux-unwind.h
|
||||
+++ b/libgcc/config/xtensa/linux-unwind.h
|
||||
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|
||||
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* movi a2, __NR_rt_sigreturn; syscall */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
33
pkgs/development/compilers/gcc/struct-ucontext-libjava.patch
Normal file
33
pkgs/development/compilers/gcc/struct-ucontext-libjava.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
--- a/libjava/include/x86_64-signal.h
|
||||
+++ a/libjava/include/x86_64-signal.h
|
||||
@@ -28,7 +28,7 @@
|
||||
#define HANDLE_DIVIDE_OVERFLOW \
|
||||
do \
|
||||
{ \
|
||||
- struct ucontext *_uc = (struct ucontext *)_p; \
|
||||
+ ucontext_t *_uc = (ucontext_t *)_p; \
|
||||
gregset_t &_gregs = _uc->uc_mcontext.gregs; \
|
||||
unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \
|
||||
\
|
||||
--- a/libjava/include/i386-signal.h
|
||||
+++ a/libjava/include/i386-signal.h
|
||||
@@ -29,7 +29,7 @@
|
||||
#define HANDLE_DIVIDE_OVERFLOW \
|
||||
do \
|
||||
{ \
|
||||
- struct ucontext *_uc = (struct ucontext *)_p; \
|
||||
+ ucontext_t *_uc = (ucontext_t *)_p; \
|
||||
gregset_t &_gregs = _uc->uc_mcontext.gregs; \
|
||||
unsigned char *_eip = (unsigned char *)_gregs[REG_EIP]; \
|
||||
\
|
||||
--- a/libjava/include/s390-signal.h
|
||||
+++ a/libjava/include/s390-signal.h
|
||||
@@ -51,7 +51,7 @@
|
||||
struct \
|
||||
{ \
|
||||
unsigned long int uc_flags; \
|
||||
- struct ucontext *uc_link; \
|
||||
+ ucontext_t *uc_link; \
|
||||
stack_t uc_stack; \
|
||||
mcontext_t uc_mcontext; \
|
||||
unsigned long sigmask[2]; \
|
||||
190
pkgs/development/compilers/gcc/struct-ucontext.patch
Normal file
190
pkgs/development/compilers/gcc/struct-ucontext.patch
Normal file
@@ -0,0 +1,190 @@
|
||||
From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
|
||||
From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Tue, 4 Jul 2017 10:23:57 +0000
|
||||
Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
|
||||
|
||||
Current glibc no longer gives the ucontext_t type the tag struct
|
||||
ucontext, to conform with POSIX namespace rules. This requires
|
||||
various linux-unwind.h files in libgcc, that were previously using
|
||||
struct ucontext, to be fixed to use ucontext_t instead. This is
|
||||
similar to the removal of the struct siginfo tag from siginfo_t some
|
||||
years ago.
|
||||
|
||||
This patch changes those files to use ucontext_t instead. As the
|
||||
standard name that should be unconditionally safe, so this is not
|
||||
restricted to architectures supported by glibc, or conditioned on the
|
||||
glibc version.
|
||||
|
||||
Tested compilation together with current glibc with glibc's
|
||||
build-many-glibcs.py.
|
||||
|
||||
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
|
||||
config/alpha/linux-unwind.h (alpha_fallback_frame_state),
|
||||
config/bfin/linux-unwind.h (bfin_fallback_frame_state),
|
||||
config/i386/linux-unwind.h (x86_64_fallback_frame_state,
|
||||
x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
|
||||
uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
|
||||
config/pa/linux-unwind.h (pa32_fallback_frame_state),
|
||||
config/sh/linux-unwind.h (sh_fallback_frame_state),
|
||||
config/tilepro/linux-unwind.h (tile_fallback_frame_state),
|
||||
config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
|
||||
ucontext_t instead of struct ucontext.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
libgcc/ChangeLog (REMOVED) | 14 ++++++++++++++
|
||||
libgcc/config/aarch64/linux-unwind.h | 2 +-
|
||||
libgcc/config/alpha/linux-unwind.h | 2 +-
|
||||
libgcc/config/bfin/linux-unwind.h | 2 +-
|
||||
libgcc/config/i386/linux-unwind.h | 4 ++--
|
||||
libgcc/config/m68k/linux-unwind.h | 2 +-
|
||||
libgcc/config/nios2/linux-unwind.h | 2 +-
|
||||
libgcc/config/pa/linux-unwind.h | 2 +-
|
||||
libgcc/config/sh/linux-unwind.h | 2 +-
|
||||
libgcc/config/tilepro/linux-unwind.h | 2 +-
|
||||
libgcc/config/xtensa/linux-unwind.h | 2 +-
|
||||
11 files changed, 25 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
|
||||
index 4512efb..06de45a 100644
|
||||
--- a/libgcc/config/aarch64/linux-unwind.h
|
||||
+++ b/libgcc/config/aarch64/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe
|
||||
{
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
};
|
||||
|
||||
struct rt_sigframe *rt_;
|
||||
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
|
||||
index bdbba4a..e84812e 100644
|
||||
--- a/libgcc/config/alpha/linux-unwind.h
|
||||
+++ b/libgcc/config/alpha/linux-unwind.h
|
||||
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
}
|
||||
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
|
||||
index 77b7c23..8bf5e82 100644
|
||||
--- a/libgcc/config/bfin/linux-unwind.h
|
||||
+++ b/libgcc/config/bfin/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
|
||||
void *puc;
|
||||
char retcode[8];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
|
||||
index 540a0a2..29efbe3 100644
|
||||
--- a/libgcc/config/i386/linux-unwind.h
|
||||
+++ b/libgcc/config/i386/linux-unwind.h
|
||||
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
|
||||
index 75b7cf7..f964e24 100644
|
||||
--- a/libgcc/config/m68k/linux-unwind.h
|
||||
+++ b/libgcc/config/m68k/linux-unwind.h
|
||||
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
/* <sys/ucontext.h> is unfortunately broken right now. */
|
||||
struct uw_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
unsigned long uc_filler[80];
|
||||
diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
|
||||
index 2304142..30f25ea 100644
|
||||
--- a/libgcc/config/nios2/linux-unwind.h
|
||||
+++ b/libgcc/config/nios2/linux-unwind.h
|
||||
@@ -38,7 +38,7 @@ struct nios2_mcontext {
|
||||
|
||||
struct nios2_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
struct nios2_mcontext uc_mcontext;
|
||||
sigset_t uc_sigmask; /* mask last for extensibility */
|
||||
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
|
||||
index 9a2657f..e47493d 100644
|
||||
--- a/libgcc/config/pa/linux-unwind.h
|
||||
+++ b/libgcc/config/pa/linux-unwind.h
|
||||
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigcontext *sc;
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *frame;
|
||||
|
||||
/* rt_sigreturn trampoline:
|
||||
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
|
||||
index e389cac..0bf43ba 100644
|
||||
--- a/libgcc/config/sh/linux-unwind.h
|
||||
+++ b/libgcc/config/sh/linux-unwind.h
|
||||
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
|
||||
index 796e976..75f8890 100644
|
||||
--- a/libgcc/config/tilepro/linux-unwind.h
|
||||
+++ b/libgcc/config/tilepro/linux-unwind.h
|
||||
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe {
|
||||
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* Return if this is not a signal handler. */
|
||||
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
|
||||
index 9872492..586a9d4 100644
|
||||
--- a/libgcc/config/xtensa/linux-unwind.h
|
||||
+++ b/libgcc/config/xtensa/linux-unwind.h
|
||||
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|
||||
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* movi a2, __NR_rt_sigreturn; syscall */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
@@ -2,23 +2,27 @@
|
||||
coreutils, rsync, bash,
|
||||
openssl, zlib, sqlite, libxml2, libyaml, libmysql, lmdb, leveldb }:
|
||||
|
||||
# TODO: distinct packages for gerbil-release and gerbil-devel
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gerbil-${version}";
|
||||
|
||||
version = "0.12-DEV";
|
||||
version = "0.12-DEV-777-gd855915";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/vyzo/gerbil.git";
|
||||
rev = "3657b6e940ea248e0b312f276590e38ff68997e7";
|
||||
sha256 = "11ys7082ghkm4yikz4qxmv3jpxcr42jfi0jhjw1mpzbqdg6004w2";
|
||||
rev = "9db6187dc996eec4087f83b86339e7b17bb69bad";
|
||||
sha256 = "1hqmsy77d62dvil3az4vdr0rmwvxhinjl1dbcxzamz2c2kcjv1jg";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gambit openssl
|
||||
gambit
|
||||
coreutils rsync bash
|
||||
zlib openssl zlib sqlite libxml2 libyaml libmysql lmdb leveldb
|
||||
openssl zlib sqlite libxml2 libyaml libmysql lmdb leveldb
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
echo '(define (gerbil-version-string) "v${version}")' > src/gerbil/runtime/gx-version.scm
|
||||
|
||||
patchShebangs .
|
||||
|
||||
find . -type f -executable -print0 | while IFS= read -r -d ''$'\0' f; do
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
{stdenv, lib, fetchurl, perl, libedit, ncurses5, gmp}:
|
||||
{ stdenv
|
||||
, fetchurl, perl
|
||||
, libedit, ncurses5, gmp
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "6.10.2";
|
||||
|
||||
name = "ghc-${version}-binary";
|
||||
|
||||
src =
|
||||
if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
# This binary requires libedit.so.0 (rather than libedit.so.2).
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
|
||||
sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b";
|
||||
}
|
||||
else if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
# Idem.
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
|
||||
sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj";
|
||||
}
|
||||
else throw "cannot bootstrap GHC on this platform";
|
||||
src = fetchurl ({
|
||||
"i686-linux" = {
|
||||
# This binary requires libedit.so.0 (rather than libedit.so.2).
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
|
||||
sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b";
|
||||
};
|
||||
"x86_64-linux" = {
|
||||
# Idem.
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
|
||||
sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj";
|
||||
};
|
||||
}.${stdenv.hostPlatform.system}
|
||||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
buildInputs = [perl];
|
||||
|
||||
@@ -27,27 +29,27 @@ stdenv.mkDerivation rec {
|
||||
# first. The GHC Cabal build system makes use of strip by default and
|
||||
# has hardcoded paths to /usr/bin/strip in many places. We replace
|
||||
# those below, making them point to our dummy script.
|
||||
''
|
||||
''
|
||||
mkdir "$TMP/bin"
|
||||
for i in strip; do
|
||||
echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
|
||||
chmod +x "$TMP/bin/$i"
|
||||
done
|
||||
PATH="$TMP/bin:$PATH"
|
||||
'' +
|
||||
'' +
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
find . -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${lib.makeLibraryPath [ libedit ncurses5 gmp ]}" {} \;
|
||||
--set-rpath "${stdenv.lib.makeLibraryPath [ libedit ncurses5 gmp ]}" {} \;
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
|
||||
done
|
||||
'' else "");
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out --with-gmp-libraries=${lib.getLib gmp}/lib --with-gmp-includes=${lib.getDev gmp}/include
|
||||
./configure --prefix=$out --with-gmp-libraries=${stdenv.lib.getLib gmp}/lib --with-gmp-includes=${stdenv.lib.getDev gmp}/include
|
||||
'';
|
||||
|
||||
# Stripping combined with patchelf breaks the executables (they die
|
||||
@@ -58,44 +60,21 @@ stdenv.mkDerivation rec {
|
||||
# calls install-strip ...
|
||||
dontBuild = true;
|
||||
|
||||
# The binaries for Darwin use frameworks, so fake those frameworks,
|
||||
# and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so
|
||||
# that the executables work with no special setup.
|
||||
postInstall =
|
||||
(if stdenv.isDarwin then
|
||||
''
|
||||
mkdir -p $out/frameworks/GMP.framework/Versions/A
|
||||
ln -s ${gmp.out}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP
|
||||
ln -s ${gmp.out}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP
|
||||
# !!! fix this
|
||||
mkdir -p $out/frameworks/GNUeditline.framework/Versions/A
|
||||
ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline
|
||||
ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/Versions/A/GNUeditline
|
||||
postInstall = ''
|
||||
# bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way
|
||||
sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf
|
||||
|
||||
mv $out/bin $out/bin-orig
|
||||
mkdir $out/bin
|
||||
for i in $(cd $out/bin-orig && ls); do
|
||||
echo \"#! $SHELL -e\" >> $out/bin/$i
|
||||
echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \\\"\\$@\\\"\" >> $out/bin/$i
|
||||
chmod +x $out/bin/$i
|
||||
done
|
||||
'' else "")
|
||||
+
|
||||
''
|
||||
# bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way
|
||||
sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf
|
||||
|
||||
# Sanity check, can ghc create executables?
|
||||
cd $TMP
|
||||
mkdir test-ghc; cd test-ghc
|
||||
cat > main.hs << EOF
|
||||
module Main where
|
||||
main = putStrLn "yes"
|
||||
EOF
|
||||
$out/bin/ghc --make main.hs
|
||||
echo compilation ok
|
||||
[ $(./main) == "yes" ]
|
||||
'';
|
||||
# Sanity check, can ghc create executables?
|
||||
cd $TMP
|
||||
mkdir test-ghc; cd test-ghc
|
||||
cat > main.hs << EOF
|
||||
module Main where
|
||||
main = putStrLn "yes"
|
||||
EOF
|
||||
$out/bin/ghc --make main.hs
|
||||
echo compilation ok
|
||||
[ $(./main) == "yes" ]
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://haskell.org/ghc;
|
||||
|
||||
@@ -27,5 +27,6 @@ stdenv.mkDerivation rec {
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported.
|
||||
inherit (ghc.meta) license;
|
||||
broken = true; # https://nix-cache.s3.amazonaws.com/log/6ys7lzckf2c0532kzhmss73mmz504can-ghc-6.10.4.drv
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
{stdenv, fetchurl, perl, ncurses5, gmp, libiconv}:
|
||||
{ stdenv
|
||||
, fetchurl, perl
|
||||
, ncurses5, gmp, libiconv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.0.4";
|
||||
|
||||
name = "ghc-${version}-binary";
|
||||
|
||||
src =
|
||||
if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
|
||||
sha256 = "0mfnihiyjl06f5w1yrjp36sw9g67g2ymg5sdl0g23h1pab99jx63";
|
||||
}
|
||||
else if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
|
||||
sha256 = "0mc4rhqcxz427wq4zgffmnn0d2yjqvy6af4x9mha283p1gdj5q99";
|
||||
}
|
||||
else if stdenv.system == "i686-darwin" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2";
|
||||
sha256 = "0qj45hslrrr8zfks8m1jcb3awwx9rh35ndnpfmb0gwb6j7azq5n3";
|
||||
}
|
||||
else if stdenv.system == "x86_64-darwin" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2";
|
||||
sha256 = "1m2ml88p1swf4dnv2vq8hz4drcp46n3ahpfi05wh01ajkf8hnn3l";
|
||||
}
|
||||
else throw "cannot bootstrap GHC on this platform";
|
||||
src = fetchurl ({
|
||||
"i686-linux" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
|
||||
sha256 = "0mfnihiyjl06f5w1yrjp36sw9g67g2ymg5sdl0g23h1pab99jx63";
|
||||
};
|
||||
"x86_64-linux" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
|
||||
sha256 = "0mc4rhqcxz427wq4zgffmnn0d2yjqvy6af4x9mha283p1gdj5q99";
|
||||
};
|
||||
"i686-darwin" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2";
|
||||
sha256 = "0qj45hslrrr8zfks8m1jcb3awwx9rh35ndnpfmb0gwb6j7azq5n3";
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2";
|
||||
sha256 = "1m2ml88p1swf4dnv2vq8hz4drcp46n3ahpfi05wh01ajkf8hnn3l";
|
||||
};
|
||||
}.${stdenv.hostPlatform.system}
|
||||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
buildInputs = [perl];
|
||||
|
||||
@@ -41,22 +41,22 @@ stdenv.mkDerivation rec {
|
||||
# first. The GHC Cabal build system makes use of strip by default and
|
||||
# has hardcoded paths to /usr/bin/strip in many places. We replace
|
||||
# those below, making them point to our dummy script.
|
||||
''
|
||||
''
|
||||
mkdir "$TMP/bin"
|
||||
for i in strip; do
|
||||
echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
|
||||
chmod +x "$TMP/bin/$i"
|
||||
done
|
||||
PATH="$TMP/bin:$PATH"
|
||||
'' +
|
||||
'' +
|
||||
# We have to patch the GMP paths for the integer-gmp package.
|
||||
''
|
||||
''
|
||||
find . -name integer-gmp.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
find . -name base.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
|
||||
'' +
|
||||
'' +
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
@@ -68,24 +68,24 @@ stdenv.mkDerivation rec {
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
|
||||
done
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
fix () {
|
||||
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1
|
||||
}
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
fix () {
|
||||
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1
|
||||
}
|
||||
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-7.0.4/utils/ghc-pwd/dist/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-7.0.4/utils/hpc/dist/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-7.0.4/ghc/stage2/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/ghc-pwd/dist/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/hpc/dist/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/ghc/stage2/build/tmp
|
||||
|
||||
for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do
|
||||
fix $(find . -type f -name $file)
|
||||
done
|
||||
for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do
|
||||
fix $(find . -type f -name $file)
|
||||
done
|
||||
|
||||
for file in $(find . -name setup-config); do
|
||||
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
|
||||
done
|
||||
'';
|
||||
for file in $(find . -name setup-config); do
|
||||
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
|
||||
done
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out \
|
||||
@@ -101,19 +101,18 @@ stdenv.mkDerivation rec {
|
||||
# calls install-strip ...
|
||||
dontBuild = true;
|
||||
|
||||
postInstall =
|
||||
''
|
||||
# Sanity check, can ghc create executables?
|
||||
cd $TMP
|
||||
mkdir test-ghc; cd test-ghc
|
||||
cat > main.hs << EOF
|
||||
module Main where
|
||||
main = putStrLn "yes"
|
||||
EOF
|
||||
$out/bin/ghc --make main.hs
|
||||
echo compilation ok
|
||||
[ $(./main) == "yes" ]
|
||||
'';
|
||||
postInstall = ''
|
||||
# Sanity check, can ghc create executables?
|
||||
cd $TMP
|
||||
mkdir test-ghc; cd test-ghc
|
||||
cat > main.hs << EOF
|
||||
module Main where
|
||||
main = putStrLn "yes"
|
||||
EOF
|
||||
$out/bin/ghc --make main.hs
|
||||
echo compilation ok
|
||||
[ $(./main) == "yes" ]
|
||||
'';
|
||||
|
||||
meta.license = stdenv.lib.licenses.bsd3;
|
||||
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
|
||||
{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils
|
||||
, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour
|
||||
|
||||
# If enabled GHC will be build with the GPL-free but slower integer-simple
|
||||
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
|
||||
{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils
|
||||
, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour
|
||||
|
||||
# If enabled GHC will be build with the GPL-free but slower integer-simple
|
||||
@@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported.
|
||||
inherit (ghc.meta) license;
|
||||
broken = true; # broken by 51cf42ad0d3ccb55af182f1f0ee5eb5094ea5995: https://hydra.nixos.org/build/60616815
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
{stdenv, fetchurl, perl, ncurses5, gmp, libiconv, makeWrapper}:
|
||||
{ stdenv
|
||||
, fetchurl, perl, makeWrapper
|
||||
, ncurses5, gmp, libiconv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.4.2";
|
||||
|
||||
name = "ghc-${version}-binary";
|
||||
|
||||
src =
|
||||
if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
|
||||
sha256 = "0gny7knhss0w0d9r6jm1gghrcb8kqjvj94bb7hxf9syrk4fxlcxi";
|
||||
}
|
||||
else if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
|
||||
sha256 = "043jabd0lh6n1zlqhysngbpvlsdznsa2mmsj08jyqgahw9sjb5ns";
|
||||
}
|
||||
else if stdenv.system == "i686-darwin" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2";
|
||||
sha256 = "1vrbs3pzki37hzym1f1nh07lrqh066z3ypvm81fwlikfsvk4djc0";
|
||||
}
|
||||
else if stdenv.system == "x86_64-darwin" then
|
||||
fetchurl {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2";
|
||||
sha256 = "1imzqc0slpg0r6p40n5a9m18cbcm0m86z8dgyhfxcckksw54mzwf";
|
||||
}
|
||||
else throw "cannot bootstrap GHC on this platform";
|
||||
src = fetchurl ({
|
||||
"i686-linux" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
|
||||
sha256 = "0gny7knhss0w0d9r6jm1gghrcb8kqjvj94bb7hxf9syrk4fxlcxi";
|
||||
};
|
||||
"x86_64-linux" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
|
||||
sha256 = "043jabd0lh6n1zlqhysngbpvlsdznsa2mmsj08jyqgahw9sjb5ns";
|
||||
};
|
||||
"i686-darwin" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2";
|
||||
sha256 = "1vrbs3pzki37hzym1f1nh07lrqh066z3ypvm81fwlikfsvk4djc0";
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2";
|
||||
sha256 = "1imzqc0slpg0r6p40n5a9m18cbcm0m86z8dgyhfxcckksw54mzwf";
|
||||
};
|
||||
}.${stdenv.hostPlatform.system}
|
||||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
buildInputs = [perl];
|
||||
|
||||
@@ -41,22 +41,22 @@ stdenv.mkDerivation rec {
|
||||
# first. The GHC Cabal build system makes use of strip by default and
|
||||
# has hardcoded paths to /usr/bin/strip in many places. We replace
|
||||
# those below, making them point to our dummy script.
|
||||
''
|
||||
''
|
||||
mkdir "$TMP/bin"
|
||||
for i in strip; do
|
||||
echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
|
||||
chmod +x "$TMP/bin/$i"
|
||||
done
|
||||
PATH="$TMP/bin:$PATH"
|
||||
'' +
|
||||
'' +
|
||||
# We have to patch the GMP paths for the integer-gmp package.
|
||||
''
|
||||
''
|
||||
find . -name integer-gmp.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
find . -name base.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
|
||||
'' +
|
||||
'' +
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
@@ -73,24 +73,24 @@ stdenv.mkDerivation rec {
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
|
||||
done
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
fix () {
|
||||
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1
|
||||
}
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
fix () {
|
||||
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1
|
||||
}
|
||||
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-7.4.2/utils/ghc-pwd/dist-install/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-7.4.2/utils/hpc/dist-install/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-7.4.2/ghc/stage2/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/ghc-pwd/dist-install/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/hpc/dist-install/build/tmp
|
||||
ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/ghc/stage2/build/tmp
|
||||
|
||||
for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do
|
||||
fix $(find . -type f -name $file)
|
||||
done
|
||||
for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do
|
||||
fix $(find . -type f -name $file)
|
||||
done
|
||||
|
||||
for file in $(find . -name setup-config); do
|
||||
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
|
||||
done
|
||||
'';
|
||||
for file in $(find . -name setup-config); do
|
||||
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
|
||||
done
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out \
|
||||
@@ -107,10 +107,10 @@ stdenv.mkDerivation rec {
|
||||
dontBuild = true;
|
||||
|
||||
preInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p $out/lib/ghc-7.4.2
|
||||
mkdir -p $out/lib/ghc-${version}
|
||||
mkdir -p $out/bin
|
||||
ln -s ${libiconv}/lib/libiconv.dylib $out/bin
|
||||
ln -s ${libiconv}/lib/libiconv.dylib $out/lib/ghc-7.4.2/libiconv.dylib
|
||||
ln -s ${libiconv}/lib/libiconv.dylib $out/lib/ghc-${version}/libiconv.dylib
|
||||
ln -s ${libiconv}/lib/libiconv.dylib utils/ghc-cabal/dist-install/build/tmp
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, ghc, perl, ncurses, binutils, libiconv
|
||||
{ stdenv, fetchurl, ghc, perl, ncurses, libiconv
|
||||
|
||||
# If enabled GHC will be build with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
|
||||
{ stdenv, lib, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils
|
||||
, hscolour, patchutils, sphinx
|
||||
|
||||
# If enabled GHC will be build with the GPL-free but slower integer-simple
|
||||
@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
|
||||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchurl, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
|
||||
{ stdenv, lib, fetchurl, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils
|
||||
, autoconf, automake, happy, alex, python3, sphinx, hscolour
|
||||
, buildPlatform, targetPlatform , selfPkgs, cross ? null
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
let
|
||||
inherit (bootPkgs) ghc;
|
||||
version = "8.2.1";
|
||||
preReleaseName = "ghc-8.2.1";
|
||||
|
||||
commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
|
||||
commonPreConfigure = ''
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/${preReleaseName}"
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
||||
@@ -26,7 +26,7 @@ in stdenv.mkDerivation (rec {
|
||||
name = "ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.haskell.org/~ghc/${version}/${preReleaseName}-src.tar.xz";
|
||||
url = "https://downloads.haskell.org/~ghc/${version}/${name}-src.tar.xz";
|
||||
sha256 = "1w4k0n23b9fg8kmarqhfamzpmf91p6jcdr6xlwzfmb4df2bd9hng";
|
||||
};
|
||||
|
||||
@@ -57,7 +57,7 @@ in stdenv.mkDerivation (rec {
|
||||
checkTarget = "test";
|
||||
|
||||
postInstall = ''
|
||||
paxmark m $out/lib/${preReleaseName}/bin/{ghc,haddock}
|
||||
paxmark m $out/lib/${name}/bin/{ghc,haddock}
|
||||
|
||||
# Install the bash completion file.
|
||||
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/ghc
|
||||
@@ -66,7 +66,7 @@ in stdenv.mkDerivation (rec {
|
||||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
@@ -97,23 +97,23 @@ in stdenv.mkDerivation (rec {
|
||||
|
||||
configureFlags = [
|
||||
"CC=${stdenv.ccCross}/bin/${cross.config}-cc"
|
||||
"LD=${stdenv.binutils}/bin/${cross.config}-ld"
|
||||
"AR=${stdenv.binutils}/bin/${cross.config}-ar"
|
||||
"NM=${stdenv.binutils}/bin/${cross.config}-nm"
|
||||
"RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib"
|
||||
"LD=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ld"
|
||||
"AR=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ar"
|
||||
"NM=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-nm"
|
||||
"RANLIB=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ranlib"
|
||||
"--target=${cross.config}"
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++
|
||||
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||
lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";
|
||||
|
||||
buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ];
|
||||
buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.targetPackages.stdenv.cc.bintools ];
|
||||
|
||||
dontSetConfigureCross = true;
|
||||
|
||||
passthru = {
|
||||
inherit bootPkgs cross;
|
||||
cc = "${stdenv.ccCross}/bin/${cross.config}-cc";
|
||||
ld = "${stdenv.binutils}/bin/${cross.config}-ld";
|
||||
ld = "${stdenv.targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ld";
|
||||
};
|
||||
})
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
|
||||
, hscolour, patchutils, sphinx
|
||||
{ stdenv, lib, fetchurl, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
|
||||
, autoconf, automake, happy, alex, python3, sphinx, hscolour
|
||||
, buildPlatform, targetPlatform , selfPkgs, cross ? null
|
||||
|
||||
# If enabled GHC will be build with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
@@ -8,38 +9,10 @@
|
||||
|
||||
let
|
||||
inherit (bootPkgs) ghc;
|
||||
version = "8.2.1.20171108";
|
||||
|
||||
fetchFilteredPatch = args: fetchurl (args // {
|
||||
downloadToTemp = true;
|
||||
postFetch = ''
|
||||
${patchutils}/bin/filterdiff --clean --strip-match=1 -x 'testsuite/*' "$downloadedFile" > "$out"
|
||||
'';
|
||||
});
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "8.0.1";
|
||||
name = "ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.haskell.org/~ghc/8.0.1/${name}-src.tar.xz";
|
||||
sha256 = "1lniqy29djhjkddnailpaqhlqh4ld2mqvb1fxgxw1qqjhz6j1ywh";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./relocation.patch
|
||||
|
||||
# Fix https://ghc.haskell.org/trac/ghc/ticket/12130
|
||||
(fetchFilteredPatch { url = https://git.haskell.org/ghc.git/patch/4d71cc89b4e9648f3fbb29c8fcd25d725616e265; sha256 = "0syaxb4y4s2dc440qmrggb4vagvqqhb55m6mx12rip4i9qhxl8k0"; })
|
||||
(fetchFilteredPatch { url = https://git.haskell.org/ghc.git/patch/2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd; sha256 = "06zvlgcf50ab58bw6yw3krn45dsmhg4cmlz4nqff8k4z1f1bj01v"; })
|
||||
] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch;
|
||||
|
||||
buildInputs = [ ghc perl hscolour sphinx];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
preConfigure = ''
|
||||
commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
|
||||
commonPreConfigure = ''
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
|
||||
@@ -48,9 +21,27 @@ stdenv.mkDerivation rec {
|
||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
||||
echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk
|
||||
'';
|
||||
in stdenv.mkDerivation (rec {
|
||||
inherit version;
|
||||
name = "ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.haskell.org/~ghc/8.2.2-rc3/${name}-src.tar.xz";
|
||||
sha256 = "13h55vcrs243bv4hv8i4jq80rsx5hvhi09r3rcs562d8zk7k665w";
|
||||
};
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
|
||||
patches = [ ./ghc-gold-linker.patch ];
|
||||
|
||||
preConfigure = commonPreConfigure;
|
||||
|
||||
buildInputs = commonBuildInputs;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"CC=${stdenv.cc}/bin/cc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
] ++ stdenv.lib.optional (! enableIntegerSimple) [
|
||||
@@ -63,6 +54,8 @@ stdenv.mkDerivation rec {
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
postInstall = ''
|
||||
paxmark m $out/lib/${name}/bin/{ghc,haddock}
|
||||
|
||||
@@ -77,8 +70,15 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
passthru = {
|
||||
inherit bootPkgs;
|
||||
} // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) {
|
||||
crossCompiler = selfPkgs.ghc.override {
|
||||
cross = targetPlatform;
|
||||
bootPkgs = selfPkgs;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -88,4 +88,32 @@ stdenv.mkDerivation rec {
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
}
|
||||
} // stdenv.lib.optionalAttrs (cross != null) {
|
||||
name = "${cross.config}-ghc-${version}";
|
||||
|
||||
preConfigure = commonPreConfigure + ''
|
||||
sed 's|#BuildFlavour = quick-cross|BuildFlavour = perf-cross|' mk/build.mk.sample > mk/build.mk
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"CC=${stdenv.ccCross}/bin/${cross.config}-cc"
|
||||
"LD=${stdenv.binutils}/bin/${cross.config}-ld"
|
||||
"AR=${stdenv.binutils}/bin/${cross.config}-ar"
|
||||
"NM=${stdenv.binutils}/bin/${cross.config}-nm"
|
||||
"RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib"
|
||||
"--target=${cross.config}"
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++
|
||||
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||
lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";
|
||||
|
||||
buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ];
|
||||
|
||||
dontSetConfigureCross = true;
|
||||
|
||||
passthru = {
|
||||
inherit bootPkgs cross;
|
||||
cc = "${stdenv.ccCross}/bin/${cross.config}-cc";
|
||||
ld = "${stdenv.binutils}/bin/${cross.config}-ld";
|
||||
};
|
||||
})
|
||||
@@ -1,19 +0,0 @@
|
||||
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
|
||||
--- a/rts/LinkerInternals.h
|
||||
+++ b/rts/LinkerInternals.h
|
||||
@@ -303,4 +303,14 @@
|
||||
# define OBJFORMAT_MACHO
|
||||
#endif
|
||||
|
||||
+/* In order to simplify control flow a bit, some references to mmap-related
|
||||
+ definitions are blocked off by a C-level if statement rather than a CPP-level
|
||||
+ #if statement. Since those are dead branches when !RTS_LINKER_USE_MMAP, we
|
||||
+ just stub out the relevant symbols here
|
||||
+*/
|
||||
+#if !RTS_LINKER_USE_MMAP
|
||||
+#define munmap(x,y) /* nothing */
|
||||
+#define MAP_ANONYMOUS 0
|
||||
+#endif
|
||||
+
|
||||
#endif /* LINKERINTERNALS_H */
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
|
||||
--- a/rts/sm/Storage.c
|
||||
+++ b/rts/sm/Storage.c
|
||||
@@ -1314,7 +1314,7 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#if (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
|
||||
-void sys_icache_invalidate(void *start, size_t len);
|
||||
+#include <libkern/OSCacheControl.h>
|
||||
#endif
|
||||
|
||||
/* On ARM and other platforms, we need to flush the cache after
|
||||
@@ -1327,7 +1327,7 @@
|
||||
(void)exec_addr;
|
||||
#elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
|
||||
/* On iOS we need to use the special 'sys_icache_invalidate' call. */
|
||||
- sys_icache_invalidate(exec_addr, ((unsigned char*)exec_addr)+len);
|
||||
+ sys_icache_invalidate(exec_addr, len);
|
||||
#elif defined(__GNUC__)
|
||||
/* For all other platforms, fall back to a libgcc builtin. */
|
||||
unsigned char* begin = (unsigned char*)exec_addr;
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
diff --git a/includes/rts/OSThreads.h b/includes/rts/OSThreads.h
|
||||
--- a/includes/rts/OSThreads.h
|
||||
+++ b/includes/rts/OSThreads.h
|
||||
@@ -15,7 +15,12 @@
|
||||
#ifndef RTS_OSTHREADS_H
|
||||
#define RTS_OSTHREADS_H
|
||||
|
||||
-#if defined(THREADED_RTS) /* to near the end */
|
||||
+#if defined(HAVE_PTHREAD_H) && !defined(mingw32_HOST_OS)
|
||||
+#define BUILD_OSTHREAD_POSIX
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+#if defined(THREADED_RTS) || defined(BUILD_OSTHREAD_POSIX) /* to near end */
|
||||
|
||||
#if defined(HAVE_PTHREAD_H) && !defined(mingw32_HOST_OS)
|
||||
|
||||
@@ -205,13 +210,25 @@
|
||||
void releaseThreadNode (void);
|
||||
#endif // !CMINUSMINUS
|
||||
|
||||
-#else
|
||||
+#endif /* defined(THREADED_RTS) || defined(BUILD_OSTHREAD_POSIX) */
|
||||
+
|
||||
+#ifndef THREADED_RTS
|
||||
+
|
||||
+#ifdef ACQUIRE_LOCK
|
||||
+// If we have pthreads, we pull in the threading primitives even when the RTS
|
||||
+// isn't threaded, but we expect these macros to be noops on non-threaded RTS.
|
||||
+
|
||||
+#undef ACQUIRE_LOCK
|
||||
+#undef RELEASE_LOCK
|
||||
+#undef ASSERT_LOCK_HELD
|
||||
+
|
||||
+#endif
|
||||
|
||||
#define ACQUIRE_LOCK(l)
|
||||
#define RELEASE_LOCK(l)
|
||||
#define ASSERT_LOCK_HELD(l)
|
||||
|
||||
-#endif /* defined(THREADED_RTS) */
|
||||
+#endif
|
||||
|
||||
#ifndef CMINUSMINUS
|
||||
//
|
||||
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c
|
||||
--- a/rts/posix/OSThreads.c
|
||||
+++ b/rts/posix/OSThreads.c
|
||||
@@ -35,7 +35,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#if defined(THREADED_RTS)
|
||||
+#if defined(THREADED_RTS) || defined(BUILD_OSTHREAD_POSIX)
|
||||
#include "RtsUtils.h"
|
||||
#include "Task.h"
|
||||
|
||||
@@ -225,47 +225,6 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-int
|
||||
-forkOS_createThread ( HsStablePtr entry )
|
||||
-{
|
||||
- pthread_t tid;
|
||||
- int result = pthread_create(&tid, NULL,
|
||||
- forkOS_createThreadWrapper, (void*)entry);
|
||||
- if(!result)
|
||||
- pthread_detach(tid);
|
||||
- return result;
|
||||
-}
|
||||
-
|
||||
-void freeThreadingResources (void) { /* nothing */ }
|
||||
-
|
||||
-uint32_t
|
||||
-getNumberOfProcessors (void)
|
||||
-{
|
||||
- static uint32_t nproc = 0;
|
||||
-
|
||||
- if (nproc == 0) {
|
||||
-#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
|
||||
- nproc = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
-#elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF)
|
||||
- nproc = sysconf(_SC_NPROCESSORS_CONF);
|
||||
-#elif defined(darwin_HOST_OS)
|
||||
- size_t size = sizeof(uint32_t);
|
||||
- if(sysctlbyname("hw.logicalcpu",&nproc,&size,NULL,0) != 0) {
|
||||
- if(sysctlbyname("hw.ncpu",&nproc,&size,NULL,0) != 0)
|
||||
- nproc = 1;
|
||||
- }
|
||||
-#elif defined(freebsd_HOST_OS)
|
||||
- size_t size = sizeof(uint32_t);
|
||||
- if(sysctlbyname("hw.ncpu",&nproc,&size,NULL,0) != 0)
|
||||
- nproc = 1;
|
||||
-#else
|
||||
- nproc = 1;
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
- return nproc;
|
||||
-}
|
||||
-
|
||||
#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETAFFINITY)
|
||||
// Schedules the thread to run on CPU n of m. m may be less than the
|
||||
// number of physical CPUs, in which case, the thread will be allowed
|
||||
@@ -353,6 +312,51 @@
|
||||
pthread_kill(id, SIGPIPE);
|
||||
}
|
||||
|
||||
+#endif /* defined(THREADED_RTS) || defined(BUILD_OSTHREAD_POSIX) */
|
||||
+
|
||||
+#if defined(THREADED_RTS)
|
||||
+
|
||||
+int
|
||||
+forkOS_createThread ( HsStablePtr entry )
|
||||
+{
|
||||
+ pthread_t tid;
|
||||
+ int result = pthread_create(&tid, NULL,
|
||||
+ forkOS_createThreadWrapper, (void*)entry);
|
||||
+ if(!result)
|
||||
+ pthread_detach(tid);
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+void freeThreadingResources (void) { /* nothing */ }
|
||||
+
|
||||
+uint32_t
|
||||
+getNumberOfProcessors (void)
|
||||
+{
|
||||
+ static uint32_t nproc = 0;
|
||||
+
|
||||
+ if (nproc == 0) {
|
||||
+#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
|
||||
+ nproc = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
+#elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF)
|
||||
+ nproc = sysconf(_SC_NPROCESSORS_CONF);
|
||||
+#elif defined(darwin_HOST_OS)
|
||||
+ size_t size = sizeof(uint32_t);
|
||||
+ if(sysctlbyname("hw.logicalcpu",&nproc,&size,NULL,0) != 0) {
|
||||
+ if(sysctlbyname("hw.ncpu",&nproc,&size,NULL,0) != 0)
|
||||
+ nproc = 1;
|
||||
+ }
|
||||
+#elif defined(freebsd_HOST_OS)
|
||||
+ size_t size = sizeof(uint32_t);
|
||||
+ if(sysctlbyname("hw.ncpu",&nproc,&size,NULL,0) != 0)
|
||||
+ nproc = 1;
|
||||
+#else
|
||||
+ nproc = 1;
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ return nproc;
|
||||
+}
|
||||
+
|
||||
#else /* !defined(THREADED_RTS) */
|
||||
|
||||
int
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -437,7 +437,11 @@
|
||||
else
|
||||
CrossCompilePrefix=""
|
||||
fi
|
||||
-TargetPlatformFull="${TargetPlatform}"
|
||||
+# Despite its similarity in name to TargetPlatform, TargetPlatformFull is used
|
||||
+# in calls to subproject configure scripts and thus must be set to the autoconf
|
||||
+# triple, not the normalized GHC triple that TargetPlatform is set to.
|
||||
+# It may be better to just do away with the GHC triples all together.
|
||||
+TargetPlatformFull="${target}"
|
||||
AC_SUBST(CrossCompiling)
|
||||
AC_SUBST(CrossCompilePrefix)
|
||||
AC_SUBST(TargetPlatformFull)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchgit, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
|
||||
{ stdenv, lib, fetchgit, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils
|
||||
, autoconf, automake, happy, alex, python3, buildPlatform, targetPlatform
|
||||
, selfPkgs, cross ? null
|
||||
|
||||
@@ -71,7 +71,7 @@ in stdenv.mkDerivation (rec {
|
||||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
@@ -40,11 +40,6 @@
|
||||
, coreutils
|
||||
, libiconv
|
||||
|
||||
, ghcjsNodePkgs ? callPackage ../../../top-level/node-packages.nix {
|
||||
generated = ./node-packages-generated.nix;
|
||||
self = ghcjsNodePkgs;
|
||||
}
|
||||
|
||||
, version ? "0.2.0"
|
||||
, ghcjsSrc ? fetchFromGitHub {
|
||||
owner = "ghcjs";
|
||||
@@ -178,7 +173,7 @@ in mkDerivation (rec {
|
||||
isCross = true;
|
||||
isGhcjs = true;
|
||||
inherit nodejs ghcjsBoot;
|
||||
inherit (ghcjsNodePkgs) "socket.io";
|
||||
socket-io = pkgs.nodePackages."socket.io";
|
||||
|
||||
inherit stage1Packages;
|
||||
mkStage2 = stage2 {
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
|
||||
bootPkgs.callPackage ./base.nix {
|
||||
inherit bootPkgs;
|
||||
broken = false;
|
||||
}
|
||||
|
||||
86
pkgs/development/compilers/ghcjs/ghcjs-head.patch
Normal file
86
pkgs/development/compilers/ghcjs/ghcjs-head.patch
Normal file
@@ -0,0 +1,86 @@
|
||||
diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
|
||||
index db8b12e..7b815c5 100644
|
||||
--- a/src-bin/Boot.hs
|
||||
+++ b/src-bin/Boot.hs
|
||||
@@ -540,9 +540,7 @@ initPackageDB :: B ()
|
||||
initPackageDB = do
|
||||
msg info "creating package databases"
|
||||
initDB "--global" <^> beLocations . blGlobalDB
|
||||
- traverseOf_ _Just initUser <^> beLocations . blUserDBDir
|
||||
where
|
||||
- initUser dir = rm_f (dir </> "package.conf") >> initDB "--user" (dir </> "package.conf.d")
|
||||
initDB dbName db = do
|
||||
rm_rf db >> mkdir_p db
|
||||
ghcjs_pkg_ ["init", toTextI db] `catchAny_` return ()
|
||||
@@ -566,29 +564,22 @@ installDevelopmentTree = subTop $ do
|
||||
msgD info $ "preparing development boot tree"
|
||||
checkpoint' "ghcjs-boot-git" "ghcjs-boot repository already cloned and prepared" $ do
|
||||
testGit "ghcjs-boot" >>= \case
|
||||
- Just False -> failWith "ghcjs-boot already exists and is not a git repository"
|
||||
- Just True -> do
|
||||
- msg info "ghcjs-boot repository already exists but checkpoint not reached, cleaning first, then cloning"
|
||||
- rm_rf "ghcjs-boot"
|
||||
+ Just _ -> do
|
||||
+ msg info "ghcjs-boot repository already exists; initializing ghcjs-boot"
|
||||
initGhcjsBoot
|
||||
Nothing -> do
|
||||
msgD info "cloning ghcjs-boot git repository"
|
||||
initGhcjsBoot
|
||||
checkpoint' "shims-git" "shims repository already cloned" $ do
|
||||
testGit "shims" >>= \case
|
||||
- Just False -> failWith "shims already exists and is not a git repository"
|
||||
- Just True -> do
|
||||
- msgD info "shims repository already exists but checkpoint not reached, cleaning first, then cloning"
|
||||
- rm_rf "shims"
|
||||
- cloneGit shimsDescr "shims" bsrcShimsDevBranch bsrcShimsDev
|
||||
+ Just _ -> do
|
||||
+ msgD info "shims repository already exists; moving on"
|
||||
Nothing -> do
|
||||
msgD info "cloning shims git repository"
|
||||
cloneGit shimsDescr "shims" bsrcShimsDevBranch bsrcShimsDev
|
||||
where
|
||||
initGhcjsBoot = sub $ do
|
||||
- cloneGit bootDescr "ghcjs-boot" bsrcBootDevBranch bsrcBootDev
|
||||
cd "ghcjs-boot"
|
||||
- git_ ["submodule", "update", "--init", "--recursive"]
|
||||
mapM_ patchPackage =<< allPackages
|
||||
preparePrimops
|
||||
buildGenPrim
|
||||
@@ -1201,14 +1192,14 @@ cabalInstallFlags parmakeGhcjs = do
|
||||
, "--avoid-reinstalls"
|
||||
, "--builddir", "dist"
|
||||
, "--with-compiler", ghcjs ^. pgmLocText
|
||||
+ , "--with-gcc", "@CC@"
|
||||
, "--with-hc-pkg", ghcjsPkg ^. pgmLocText
|
||||
- , "--prefix", toTextI instDir
|
||||
+ , "--prefix", "@PREFIX@"
|
||||
+ , "--libdir", "$prefix/lib/$compiler"
|
||||
+ , "--libsubdir", "$pkgid"
|
||||
, bool haddock "--enable-documentation" "--disable-documentation"
|
||||
, "--haddock-html"
|
||||
--- workaround for hoogle support being broken in haddock for GHC 7.10RC1
|
||||
-#if !(__GLASGOW_HASKELL__ >= 709)
|
||||
, "--haddock-hoogle"
|
||||
-#endif
|
||||
, "--haddock-hyperlink-source"
|
||||
-- don't slow down Windows builds too much, on other platforms we get this more
|
||||
-- or less for free, thanks to dynamic-too
|
||||
diff --git a/src/Compiler/Info.hs b/src/Compiler/Info.hs
|
||||
index 33a401f..e2405a7 100644
|
||||
--- a/src/Compiler/Info.hs
|
||||
+++ b/src/Compiler/Info.hs
|
||||
@@ -48,13 +48,7 @@ compilerInfo nativeToo dflags = do
|
||||
|
||||
-- | the directory to use if started without -B flag
|
||||
getDefaultTopDir :: IO FilePath
|
||||
-getDefaultTopDir = do
|
||||
- appdir <- getAppUserDataDirectory "ghcjs"
|
||||
- return (appdir </> subdir </> "ghcjs")
|
||||
- where
|
||||
- targetARCH = arch
|
||||
- targetOS = os
|
||||
- subdir = targetARCH ++ '-':targetOS ++ '-':getFullCompilerVersion
|
||||
+getDefaultTopDir = return "@PREFIX@/lib/ghcjs-@VERSION@"
|
||||
|
||||
getDefaultLibDir :: IO FilePath
|
||||
getDefaultLibDir = getDefaultTopDir
|
||||
@@ -6,19 +6,15 @@ bootPkgs.callPackage ./base.nix {
|
||||
inherit bootPkgs;
|
||||
|
||||
ghcjsSrc = fetchFromGitHub {
|
||||
# TODO: switch back to the regular ghcjs repo
|
||||
# when https://github.com/ghcjs/ghcjs/pull/573 is merged.
|
||||
owner = "k0001";
|
||||
owner = "ghcjs";
|
||||
repo = "ghcjs";
|
||||
rev = "600015e085a28da601b65a41c513d4a458fcd184";
|
||||
sha256 = "01kirrg0fnfwhllvwgfqjiwzwj4yv4lyig87x61n9jp6y5shzjdx";
|
||||
rev = "2b3759942fb5b2fc1a58d314d9b098d4622fa6b6";
|
||||
sha256 = "15asapg0va8dvcdycsx8dgk4xcpdnhml4h31wka6vvxf5anzz8aw";
|
||||
};
|
||||
ghcjsBootSrc = fetchgit {
|
||||
# TODO: switch back to git://github.com/ghcjs/ghcjs-boot.git
|
||||
# when https://github.com/ghcjs/ghcjs-boot/pull/41 is merged.
|
||||
url = git://github.com/basvandijk/ghcjs-boot.git;
|
||||
rev = "19a3b157ecb807c2224daffda5baecc92b76af35";
|
||||
sha256 = "16sgr8vfr1nx5ljnk8gckgjk70zpa67ix4dbr9aizkwyz41ilfrb";
|
||||
url = git://github.com/ghcjs/ghcjs-boot.git;
|
||||
rev = "106e144cca6529a1b9612c11aea5d6ef65b96745";
|
||||
sha256 = "0gxg8iiwvm93x1dwhxypczn9qiz4m1xvj8i7cf4snfdy2jdyhi5l";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -49,4 +45,6 @@ bootPkgs.callPackage ./base.nix {
|
||||
"unix"
|
||||
];
|
||||
stage2 = import ./head_stage2.nix;
|
||||
|
||||
patches = [ ./ghcjs-head.patch ];
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
fetchFromGitHub {
|
||||
owner = "ghcjs";
|
||||
repo = "shims";
|
||||
rev = "f67394c559ac921a768b12f141499119563b8bf3";
|
||||
sha256 = "1lz86qmkxkfch1yk9a62admw7jsd34sqcrskgpq28hbhjpgzf1lv";
|
||||
rev = "85395dce971e23a39e5f93af4ed139ca36d4e448";
|
||||
sha256 = "1kqgik75jx681s1kjx1s7dryigr3m940c3zb9vy0r3psxrw6sf2g";
|
||||
}
|
||||
|
||||
@@ -2,117 +2,145 @@
|
||||
|
||||
{
|
||||
async = callPackage
|
||||
({ mkDerivation, base, HUnit, stm, test-framework
|
||||
, test-framework-hunit, stdenv
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "async";
|
||||
version = "2.1.1";
|
||||
src = "${ghcjsBoot}/boot/async";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base stm ];
|
||||
testHaskellDepends = [
|
||||
base HUnit test-framework test-framework-hunit
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/simonmar/async;
|
||||
description = "Run IO operations asynchronously and wait for their results";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
({ mkDerivation, base, HUnit, stdenv, stm, test-framework
|
||||
, test-framework-hunit
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "async";
|
||||
version = "2.1.1";
|
||||
src = "${ghcjsBoot}/boot/async";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base stm ];
|
||||
testHaskellDepends = [
|
||||
base HUnit test-framework test-framework-hunit
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/simonmar/async";
|
||||
description = "Run IO operations asynchronously and wait for their results";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
aeson = callPackage
|
||||
({ mkDerivation, attoparsec, base, base-compat, base-orphans
|
||||
, base16-bytestring, bytestring, containers, deepseq, directory
|
||||
, dlist, fetchgit, filepath, generic-deriving, ghc-prim, hashable
|
||||
, hashable-time, HUnit, integer-logarithms, QuickCheck
|
||||
, quickcheck-instances, scientific, stdenv, tagged
|
||||
, template-haskell, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2, text, time, time-locale-compat
|
||||
, unordered-containers, uuid-types, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "aeson";
|
||||
version = "1.1.1.0";
|
||||
src = "${ghcjsBoot}/boot/aeson";
|
||||
libraryHaskellDepends = [
|
||||
attoparsec base base-compat bytestring containers deepseq dlist
|
||||
ghc-prim hashable scientific tagged template-haskell text time
|
||||
time-locale-compat unordered-containers uuid-types vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
attoparsec base base-compat base-orphans base16-bytestring
|
||||
bytestring containers directory dlist filepath generic-deriving
|
||||
ghc-prim hashable hashable-time HUnit integer-logarithms QuickCheck
|
||||
quickcheck-instances scientific tagged template-haskell
|
||||
test-framework test-framework-hunit test-framework-quickcheck2 text
|
||||
time time-locale-compat unordered-containers uuid-types vector
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/bos/aeson;
|
||||
description = "Fast JSON parsing and encoding";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
, base16-bytestring, bytestring, containers, deepseq, directory
|
||||
, dlist, filepath, generic-deriving, ghc-prim, hashable
|
||||
, hashable-time, HUnit, integer-logarithms, QuickCheck
|
||||
, quickcheck-instances, scientific, stdenv, tagged
|
||||
, template-haskell, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2, text, th-abstraction, time
|
||||
, time-locale-compat, unordered-containers, uuid-types, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "aeson";
|
||||
version = "1.2.2.0";
|
||||
src = "${ghcjsBoot}/boot/aeson";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
attoparsec base base-compat bytestring containers deepseq dlist
|
||||
ghc-prim hashable scientific tagged template-haskell text
|
||||
th-abstraction time time-locale-compat unordered-containers
|
||||
uuid-types vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
attoparsec base base-compat base-orphans base16-bytestring
|
||||
bytestring containers directory dlist filepath generic-deriving
|
||||
ghc-prim hashable hashable-time HUnit integer-logarithms QuickCheck
|
||||
quickcheck-instances scientific tagged template-haskell
|
||||
test-framework test-framework-hunit test-framework-quickcheck2 text
|
||||
time time-locale-compat unordered-containers uuid-types vector
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/bos/aeson";
|
||||
description = "Fast JSON parsing and encoding";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
attoparsec = callPackage
|
||||
({ mkDerivation, array, base, bytestring, case-insensitive
|
||||
, containers, criterion, deepseq, directory, filepath, ghc-prim
|
||||
, http-types, parsec, QuickCheck, quickcheck-unicode, scientific
|
||||
, tasty, tasty-quickcheck, text, transformers, unordered-containers
|
||||
, vector, stdenv
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "attoparsec";
|
||||
version = "0.13.1.0";
|
||||
src = "${ghcjsBoot}/boot/attoparsec";
|
||||
libraryHaskellDepends = [
|
||||
array base bytestring containers deepseq scientific text
|
||||
transformers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
array base bytestring deepseq QuickCheck quickcheck-unicode
|
||||
scientific tasty tasty-quickcheck text transformers vector
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
array base bytestring case-insensitive containers criterion deepseq
|
||||
directory filepath ghc-prim http-types parsec scientific text
|
||||
transformers unordered-containers vector
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/bos/attoparsec;
|
||||
description = "Fast combinator parsing for bytestrings and text";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
, containers, criterion, deepseq, directory, filepath, ghc-prim
|
||||
, http-types, parsec, QuickCheck, quickcheck-unicode, scientific
|
||||
, stdenv, tasty, tasty-quickcheck, text, transformers
|
||||
, unordered-containers, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "attoparsec";
|
||||
version = "0.13.1.0";
|
||||
src = "${ghcjsBoot}/boot/attoparsec";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
array base bytestring containers deepseq scientific text
|
||||
transformers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
array base bytestring deepseq QuickCheck quickcheck-unicode
|
||||
scientific tasty tasty-quickcheck text transformers vector
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
array base bytestring case-insensitive containers criterion deepseq
|
||||
directory filepath ghc-prim http-types parsec scientific text
|
||||
transformers unordered-containers vector
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/bos/attoparsec";
|
||||
description = "Fast combinator parsing for bytestrings and text";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
base-compat = callPackage
|
||||
({ mkDerivation, base, hspec, QuickCheck, stdenv, unix }:
|
||||
mkDerivation {
|
||||
pname = "base-compat";
|
||||
version = "0.9.3";
|
||||
src = "${ghcjsBoot}/boot/base-compat";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base unix ];
|
||||
testHaskellDepends = [ base hspec QuickCheck ];
|
||||
jailbreak = true;
|
||||
description = "A compatibility layer for base";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
bytestring-builder = callPackage
|
||||
({ mkDerivation, base, bytestring, deepseq, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "bytestring-builder";
|
||||
version = "0.10.8.1.0";
|
||||
src = "${ghcjsBoot}/boot/bytestring-builder";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base bytestring deepseq ];
|
||||
jailbreak = true;
|
||||
description = "The new bytestring builder, packaged outside of GHC";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
case-insensitive = callPackage
|
||||
({ mkDerivation, base, bytestring, criterion, deepseq, hashable
|
||||
, HUnit, test-framework, test-framework-hunit, text, stdenv
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "case-insensitive";
|
||||
version = "1.2.0.8";
|
||||
src = "${ghcjsBoot}/boot/case-insensitive";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base bytestring deepseq hashable text ];
|
||||
testHaskellDepends = [
|
||||
base bytestring HUnit test-framework test-framework-hunit text
|
||||
];
|
||||
benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/basvandijk/case-insensitive;
|
||||
description = "Case insensitive string comparison";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
, HUnit, stdenv, test-framework, test-framework-hunit, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "case-insensitive";
|
||||
version = "1.2.0.8";
|
||||
src = "${ghcjsBoot}/boot/case-insensitive";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base bytestring deepseq hashable text ];
|
||||
testHaskellDepends = [
|
||||
base bytestring HUnit test-framework test-framework-hunit text
|
||||
];
|
||||
benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/basvandijk/case-insensitive";
|
||||
description = "Case insensitive string comparison";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
dlist = callPackage
|
||||
({ mkDerivation, base, Cabal, deepseq, QuickCheck, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "dlist";
|
||||
version = "0.8.0.2";
|
||||
src = "${ghcjsBoot}/boot/dlist";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base deepseq ];
|
||||
testHaskellDepends = [ base Cabal QuickCheck ];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/spl/dlist;
|
||||
description = "Difference lists";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
mkDerivation {
|
||||
pname = "dlist";
|
||||
version = "0.8.0.2";
|
||||
src = "${ghcjsBoot}/boot/dlist";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base deepseq ];
|
||||
testHaskellDepends = [ base Cabal QuickCheck ];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/spl/dlist";
|
||||
description = "Difference lists";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
extensible-exceptions = callPackage
|
||||
({ mkDerivation, base, stdenv }:
|
||||
mkDerivation {
|
||||
@@ -125,10 +153,21 @@
|
||||
description = "Extensible exceptions";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
fail = callPackage
|
||||
({ mkDerivation, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "fail";
|
||||
version = "4.9.0.0";
|
||||
src = "${ghcjsBoot}/boot/fail";
|
||||
jailbreak = true;
|
||||
homepage = "https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail";
|
||||
description = "Forward-compatible MonadFail class";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
hashable = callPackage
|
||||
({ mkDerivation, base, bytestring, ghc-prim, HUnit, integer-gmp
|
||||
, QuickCheck, random, stdenv, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2, text, unix
|
||||
({ mkDerivation, base, bytestring, criterion, ghc-prim, HUnit
|
||||
, integer-gmp, QuickCheck, random, siphash, stdenv, test-framework
|
||||
, test-framework-hunit, test-framework-quickcheck2, text, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "hashable";
|
||||
@@ -142,24 +181,58 @@
|
||||
base bytestring ghc-prim HUnit QuickCheck random test-framework
|
||||
test-framework-hunit test-framework-quickcheck2 text unix
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring criterion ghc-prim integer-gmp siphash text
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = http://github.com/tibbe/hashable;
|
||||
homepage = "http://github.com/tibbe/hashable";
|
||||
description = "A class for types that can be converted to a hash value";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
integer-logarithms = callPackage
|
||||
({ mkDerivation, array, base, ghc-prim, integer-gmp, QuickCheck
|
||||
, smallcheck, stdenv, tasty, tasty-hunit, tasty-quickcheck
|
||||
, tasty-smallcheck
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "integer-logarithms";
|
||||
version = "1.0.2";
|
||||
src = "${ghcjsBoot}/boot/integer-logarithms";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ array base ghc-prim integer-gmp ];
|
||||
testHaskellDepends = [
|
||||
base QuickCheck smallcheck tasty tasty-hunit tasty-quickcheck
|
||||
tasty-smallcheck
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/phadej/integer-logarithms";
|
||||
description = "Integer logarithms";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
mtl = callPackage
|
||||
({ mkDerivation, base, stdenv, transformers }:
|
||||
mkDerivation {
|
||||
pname = "mtl";
|
||||
version = "2.2.2";
|
||||
version = "2.2.1";
|
||||
src = "${ghcjsBoot}/boot/mtl";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base transformers ];
|
||||
jailbreak = true;
|
||||
homepage = http://github.com/ekmett/mtl;
|
||||
homepage = "http://github.com/ekmett/mtl";
|
||||
description = "Monad classes, using functional dependencies";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
nats = callPackage
|
||||
({ mkDerivation, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "nats";
|
||||
version = "1.1.1";
|
||||
src = "${ghcjsBoot}/boot/nats";
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/ekmett/nats/";
|
||||
description = "Natural numbers";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
old-time = callPackage
|
||||
({ mkDerivation, base, old-locale, stdenv }:
|
||||
mkDerivation {
|
||||
@@ -184,30 +257,57 @@
|
||||
description = "Parallel programming library";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
random = callPackage
|
||||
({ mkDerivation, base, stdenv, time }:
|
||||
mkDerivation {
|
||||
pname = "random";
|
||||
version = "1.1";
|
||||
src = "${ghcjsBoot}/boot/random";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base time ];
|
||||
testHaskellDepends = [ base ];
|
||||
jailbreak = true;
|
||||
description = "random number library";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
scientific = callPackage
|
||||
({ mkDerivation, base, binary, bytestring, containers, criterion
|
||||
, deepseq, ghc-prim, hashable, integer-gmp, integer-logarithms
|
||||
, QuickCheck, smallcheck, tasty, tasty-ant-xml, tasty-hunit
|
||||
, tasty-quickcheck, tasty-smallcheck, text, vector, stdenv
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "scientific";
|
||||
version = "0.3.4.10";
|
||||
src = "${ghcjsBoot}/boot/scientific";
|
||||
libraryHaskellDepends = [
|
||||
base binary bytestring containers deepseq ghc-prim hashable
|
||||
integer-gmp integer-logarithms text vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base binary bytestring QuickCheck smallcheck tasty tasty-ant-xml
|
||||
tasty-hunit tasty-quickcheck tasty-smallcheck text
|
||||
];
|
||||
benchmarkHaskellDepends = [ base criterion ];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/basvandijk/scientific;
|
||||
description = "Numbers represented using scientific notation";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
, deepseq, ghc-prim, hashable, integer-gmp, integer-logarithms
|
||||
, QuickCheck, smallcheck, stdenv, tasty, tasty-ant-xml, tasty-hunit
|
||||
, tasty-quickcheck, tasty-smallcheck, text, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "scientific";
|
||||
version = "0.3.4.10";
|
||||
src = "${ghcjsBoot}/boot/scientific";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
base binary bytestring containers deepseq ghc-prim hashable
|
||||
integer-gmp integer-logarithms text vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base binary bytestring QuickCheck smallcheck tasty tasty-ant-xml
|
||||
tasty-hunit tasty-quickcheck tasty-smallcheck text
|
||||
];
|
||||
benchmarkHaskellDepends = [ base criterion ];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/basvandijk/scientific";
|
||||
description = "Numbers represented using scientific notation";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
semigroups = callPackage
|
||||
({ mkDerivation, base, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "semigroups";
|
||||
version = "0.18.3";
|
||||
src = "${ghcjsBoot}/boot/semigroups";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base ];
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/ekmett/semigroups/";
|
||||
description = "Anything that associates";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
stm = callPackage
|
||||
({ mkDerivation, array, base, stdenv }:
|
||||
mkDerivation {
|
||||
@@ -230,27 +330,27 @@
|
||||
libraryHaskellDepends = [ base ];
|
||||
testHaskellDepends = [ base containers HUnit mtl ];
|
||||
jailbreak = true;
|
||||
homepage = http://www.cs.uu.nl/wiki/GenericProgramming/SYB;
|
||||
homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
|
||||
description = "Scrap Your Boilerplate";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
tagged = callPackage
|
||||
({ mkDerivation, base, deepseq, template-haskell, transformers
|
||||
, transformers-compat, stdenv
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "tagged";
|
||||
version = "0.8.5";
|
||||
src = "${ghcjsBoot}/boot/tagged";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
base deepseq template-haskell transformers transformers-compat
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = http://github.com/ekmett/tagged;
|
||||
description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
({ mkDerivation, base, deepseq, stdenv, template-haskell
|
||||
, transformers, transformers-compat
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "tagged";
|
||||
version = "0.8.5";
|
||||
src = "${ghcjsBoot}/boot/tagged";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
base deepseq template-haskell transformers transformers-compat
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/ekmett/tagged";
|
||||
description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
text = callPackage
|
||||
({ mkDerivation, array, base, binary, bytestring, deepseq, directory
|
||||
, ghc-prim, HUnit, integer-gmp, QuickCheck, quickcheck-unicode
|
||||
@@ -271,57 +371,104 @@
|
||||
test-framework-hunit test-framework-quickcheck2
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/bos/text;
|
||||
homepage = "https://github.com/bos/text";
|
||||
description = "An efficient packed Unicode text type";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
th-abstraction = callPackage
|
||||
({ mkDerivation, base, containers, ghc-prim, stdenv
|
||||
, template-haskell
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "th-abstraction";
|
||||
version = "0.2.6.0";
|
||||
src = "${ghcjsBoot}/boot/th-abstraction";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
base containers ghc-prim template-haskell
|
||||
];
|
||||
testHaskellDepends = [ base containers template-haskell ];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/glguy/th-abstraction";
|
||||
description = "Nicer interface for reified information about data types";
|
||||
license = stdenv.lib.licenses.isc;
|
||||
}) {};
|
||||
time-locale-compat = callPackage
|
||||
({ mkDerivation, base, old-locale, stdenv, time }:
|
||||
mkDerivation {
|
||||
pname = "time-locale-compat";
|
||||
version = "0.1.1.3";
|
||||
src = "${ghcjsBoot}/boot/time-locale-compat";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base old-locale time ];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/khibino/haskell-time-locale-compat";
|
||||
description = "Compatibility of TimeLocale between old-locale and time-1.5";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
transformers-compat = callPackage
|
||||
({ mkDerivation, base, ghc-prim, stdenv, transformers }:
|
||||
mkDerivation {
|
||||
pname = "transformers-compat";
|
||||
version = "0.5.1.4";
|
||||
src = "${ghcjsBoot}/boot/transformers-compat";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base ghc-prim transformers ];
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/ekmett/transformers-compat/";
|
||||
description = "A small compatibility shim exposing the new types from transformers 0.3 and 0.4 to older Haskell platforms.";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
unordered-containers = callPackage
|
||||
({ mkDerivation, base, bytestring, ChasingBottoms, containers
|
||||
, criterion, deepseq, deepseq-generics, hashable, hashmap, HUnit
|
||||
, mtl, QuickCheck, random, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2, stdenv
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "unordered-containers";
|
||||
version = "0.2.7.2";
|
||||
src = "${ghcjsBoot}/boot/unordered-containers";
|
||||
libraryHaskellDepends = [ base deepseq hashable ];
|
||||
testHaskellDepends = [
|
||||
base ChasingBottoms containers hashable HUnit QuickCheck
|
||||
test-framework test-framework-hunit test-framework-quickcheck2
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring containers criterion deepseq deepseq-generics
|
||||
hashable hashmap mtl random
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/tibbe/unordered-containers;
|
||||
description = "Efficient hashing-based container types";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
, criterion, deepseq, deepseq-generics, hashable, hashmap, HUnit
|
||||
, mtl, QuickCheck, random, stdenv, test-framework
|
||||
, test-framework-hunit, test-framework-quickcheck2
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "unordered-containers";
|
||||
version = "0.2.7.2";
|
||||
src = "${ghcjsBoot}/boot/unordered-containers";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base deepseq hashable ];
|
||||
testHaskellDepends = [
|
||||
base ChasingBottoms containers hashable HUnit QuickCheck
|
||||
test-framework test-framework-hunit test-framework-quickcheck2
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring containers criterion deepseq deepseq-generics
|
||||
hashable hashmap mtl random
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/tibbe/unordered-containers";
|
||||
description = "Efficient hashing-based container types";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
uuid-types = callPackage
|
||||
({ mkDerivation, base, binary, bytestring, containers, criterion
|
||||
, deepseq, hashable, HUnit, QuickCheck, random, stdenv, tasty
|
||||
, tasty-hunit, tasty-quickcheck, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "uuid-types";
|
||||
version = "1.0.3";
|
||||
src = "${ghcjsBoot}/boot/uuid/uuid-types";
|
||||
libraryHaskellDepends = [
|
||||
base binary bytestring deepseq hashable random text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring HUnit QuickCheck tasty tasty-hunit tasty-quickcheck
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring containers criterion deepseq random
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/aslatter/uuid;
|
||||
description = "Type definitions for Universally Unique Identifiers";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
, deepseq, hashable, HUnit, QuickCheck, random, stdenv, tasty
|
||||
, tasty-hunit, tasty-quickcheck, text, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "uuid-types";
|
||||
version = "1.0.3";
|
||||
src = "${ghcjsBoot}/boot/uuid/uuid-types";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
base binary bytestring deepseq hashable random text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring HUnit QuickCheck tasty tasty-hunit tasty-quickcheck
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring containers criterion deepseq random
|
||||
unordered-containers
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/hvr/uuid";
|
||||
description = "Type definitions for Universally Unique Identifiers";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
vector = callPackage
|
||||
({ mkDerivation, base, deepseq, ghc-prim, primitive, QuickCheck
|
||||
, random, stdenv, template-haskell, test-framework
|
||||
@@ -338,7 +485,7 @@
|
||||
test-framework-quickcheck2 transformers
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = https://github.com/haskell/vector;
|
||||
homepage = "https://github.com/haskell/vector";
|
||||
description = "Efficient Arrays";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
@@ -366,16 +513,15 @@
|
||||
test-framework-hunit test-framework-quickcheck2 text
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = http://github.com/ghcjs/ghcjs-base;
|
||||
description = "Base library for GHCJS";
|
||||
homepage = "http://github.com/ghcjs/ghcjs-base";
|
||||
description = "base library for GHCJS";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
Cabal = callPackage
|
||||
({ mkDerivation, array, base, binary, bytestring, containers
|
||||
, deepseq, directory, extensible-exceptions, filepath, HUnit
|
||||
, old-time, pretty, process, QuickCheck, regex-posix, stdenv
|
||||
, test-framework, test-framework-hunit, test-framework-quickcheck2
|
||||
, time, unix
|
||||
, deepseq, directory, exceptions, filepath, old-time, pretty
|
||||
, process, QuickCheck, regex-posix, stdenv, tagged, tasty
|
||||
, tasty-hunit, tasty-quickcheck, time, transformers, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "Cabal";
|
||||
@@ -387,12 +533,12 @@
|
||||
pretty process time unix
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring containers directory extensible-exceptions filepath
|
||||
HUnit old-time process QuickCheck regex-posix test-framework
|
||||
test-framework-hunit test-framework-quickcheck2 unix
|
||||
base bytestring containers directory exceptions filepath old-time
|
||||
pretty process QuickCheck regex-posix tagged tasty tasty-hunit
|
||||
tasty-quickcheck transformers unix
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = http://www.haskell.org/cabal/;
|
||||
homepage = "http://www.haskell.org/cabal/";
|
||||
description = "A framework for packaging Haskell software";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
{ self, fetchurl, fetchgit ? null, lib }:
|
||||
|
||||
{
|
||||
by-spec."accepts"."1.1.4" =
|
||||
self.by-version."accepts"."1.1.4";
|
||||
by-version."accepts"."1.1.4" = self.buildNodePackage {
|
||||
name = "accepts-1.1.4";
|
||||
version = "1.1.4";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/accepts/-/accepts-1.1.4.tgz";
|
||||
name = "accepts-1.1.4.tgz";
|
||||
sha1 = "d71c96f7d41d0feda2c38cd14e8a27c04158df4a";
|
||||
};
|
||||
deps = {
|
||||
"mime-types-2.0.14" = self.by-version."mime-types"."2.0.14";
|
||||
"negotiator-0.4.9" = self.by-version."negotiator"."0.4.9";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."after"."0.8.1" =
|
||||
self.by-version."after"."0.8.1";
|
||||
by-version."after"."0.8.1" = self.buildNodePackage {
|
||||
name = "after-0.8.1";
|
||||
version = "0.8.1";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/after/-/after-0.8.1.tgz";
|
||||
name = "after-0.8.1.tgz";
|
||||
sha1 = "ab5d4fb883f596816d3515f8f791c0af486dd627";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."arraybuffer.slice"."0.0.6" =
|
||||
self.by-version."arraybuffer.slice"."0.0.6";
|
||||
by-version."arraybuffer.slice"."0.0.6" = self.buildNodePackage {
|
||||
name = "arraybuffer.slice-0.0.6";
|
||||
version = "0.0.6";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz";
|
||||
name = "arraybuffer.slice-0.0.6.tgz";
|
||||
sha1 = "f33b2159f0532a3f3107a272c0ccfbd1ad2979ca";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."backo2"."1.0.2" =
|
||||
self.by-version."backo2"."1.0.2";
|
||||
by-version."backo2"."1.0.2" = self.buildNodePackage {
|
||||
name = "backo2-1.0.2";
|
||||
version = "1.0.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz";
|
||||
name = "backo2-1.0.2.tgz";
|
||||
sha1 = "31ab1ac8b129363463e35b3ebb69f4dfcfba7947";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."base64-arraybuffer"."0.1.2" =
|
||||
self.by-version."base64-arraybuffer"."0.1.2";
|
||||
by-version."base64-arraybuffer"."0.1.2" = self.buildNodePackage {
|
||||
name = "base64-arraybuffer-0.1.2";
|
||||
version = "0.1.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz";
|
||||
name = "base64-arraybuffer-0.1.2.tgz";
|
||||
sha1 = "474df4a9f2da24e05df3158c3b1db3c3cd46a154";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."base64id"."0.1.0" =
|
||||
self.by-version."base64id"."0.1.0";
|
||||
by-version."base64id"."0.1.0" = self.buildNodePackage {
|
||||
name = "base64id-0.1.0";
|
||||
version = "0.1.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz";
|
||||
name = "base64id-0.1.0.tgz";
|
||||
sha1 = "02ce0fdeee0cef4f40080e1e73e834f0b1bfce3f";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."benchmark"."1.0.0" =
|
||||
self.by-version."benchmark"."1.0.0";
|
||||
by-version."benchmark"."1.0.0" = self.buildNodePackage {
|
||||
name = "benchmark-1.0.0";
|
||||
version = "1.0.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/benchmark/-/benchmark-1.0.0.tgz";
|
||||
name = "benchmark-1.0.0.tgz";
|
||||
sha1 = "2f1e2fa4c359f11122aa183082218e957e390c73";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."better-assert"."~1.0.0" =
|
||||
self.by-version."better-assert"."1.0.2";
|
||||
by-version."better-assert"."1.0.2" = self.buildNodePackage {
|
||||
name = "better-assert-1.0.2";
|
||||
version = "1.0.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz";
|
||||
name = "better-assert-1.0.2.tgz";
|
||||
sha1 = "40866b9e1b9e0b55b481894311e68faffaebc522";
|
||||
};
|
||||
deps = {
|
||||
"callsite-1.0.0" = self.by-version."callsite"."1.0.0";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."blob"."0.0.4" =
|
||||
self.by-version."blob"."0.0.4";
|
||||
by-version."blob"."0.0.4" = self.buildNodePackage {
|
||||
name = "blob-0.0.4";
|
||||
version = "0.0.4";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/blob/-/blob-0.0.4.tgz";
|
||||
name = "blob-0.0.4.tgz";
|
||||
sha1 = "bcf13052ca54463f30f9fc7e95b9a47630a94921";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."callsite"."1.0.0" =
|
||||
self.by-version."callsite"."1.0.0";
|
||||
by-version."callsite"."1.0.0" = self.buildNodePackage {
|
||||
name = "callsite-1.0.0";
|
||||
version = "1.0.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz";
|
||||
name = "callsite-1.0.0.tgz";
|
||||
sha1 = "280398e5d664bd74038b6f0905153e6e8af1bc20";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."component-bind"."1.0.0" =
|
||||
self.by-version."component-bind"."1.0.0";
|
||||
by-version."component-bind"."1.0.0" = self.buildNodePackage {
|
||||
name = "component-bind-1.0.0";
|
||||
version = "1.0.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz";
|
||||
name = "component-bind-1.0.0.tgz";
|
||||
sha1 = "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."component-emitter"."1.1.2" =
|
||||
self.by-version."component-emitter"."1.1.2";
|
||||
by-version."component-emitter"."1.1.2" = self.buildNodePackage {
|
||||
name = "component-emitter-1.1.2";
|
||||
version = "1.1.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz";
|
||||
name = "component-emitter-1.1.2.tgz";
|
||||
sha1 = "296594f2753daa63996d2af08d15a95116c9aec3";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."component-emitter"."1.2.0" =
|
||||
self.by-version."component-emitter"."1.2.0";
|
||||
by-version."component-emitter"."1.2.0" = self.buildNodePackage {
|
||||
name = "component-emitter-1.2.0";
|
||||
version = "1.2.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/component-emitter/-/component-emitter-1.2.0.tgz";
|
||||
name = "component-emitter-1.2.0.tgz";
|
||||
sha1 = "ccd113a86388d06482d03de3fc7df98526ba8efe";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."component-inherit"."0.0.3" =
|
||||
self.by-version."component-inherit"."0.0.3";
|
||||
by-version."component-inherit"."0.0.3" = self.buildNodePackage {
|
||||
name = "component-inherit-0.0.3";
|
||||
version = "0.0.3";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz";
|
||||
name = "component-inherit-0.0.3.tgz";
|
||||
sha1 = "645fc4adf58b72b649d5cae65135619db26ff143";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."debug"."0.7.4" =
|
||||
self.by-version."debug"."0.7.4";
|
||||
by-version."debug"."0.7.4" = self.buildNodePackage {
|
||||
name = "debug-0.7.4";
|
||||
version = "0.7.4";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/debug/-/debug-0.7.4.tgz";
|
||||
name = "debug-0.7.4.tgz";
|
||||
sha1 = "06e1ea8082c2cb14e39806e22e2f6f757f92af39";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."debug"."2.2.0" =
|
||||
self.by-version."debug"."2.2.0";
|
||||
by-version."debug"."2.2.0" = self.buildNodePackage {
|
||||
name = "debug-2.2.0";
|
||||
version = "2.2.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz";
|
||||
name = "debug-2.2.0.tgz";
|
||||
sha1 = "f87057e995b1a1f6ae6a4960664137bc56f039da";
|
||||
};
|
||||
deps = {
|
||||
"ms-0.7.1" = self.by-version."ms"."0.7.1";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."engine.io"."1.6.8" =
|
||||
self.by-version."engine.io"."1.6.8";
|
||||
by-version."engine.io"."1.6.8" = self.buildNodePackage {
|
||||
name = "engine.io-1.6.8";
|
||||
version = "1.6.8";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/engine.io/-/engine.io-1.6.8.tgz";
|
||||
name = "engine.io-1.6.8.tgz";
|
||||
sha1 = "de05a06b757e7517695e088c7b051c47819f511b";
|
||||
};
|
||||
deps = {
|
||||
"base64id-0.1.0" = self.by-version."base64id"."0.1.0";
|
||||
"debug-2.2.0" = self.by-version."debug"."2.2.0";
|
||||
"ws-1.0.1" = self.by-version."ws"."1.0.1";
|
||||
"engine.io-parser-1.2.4" = self.by-version."engine.io-parser"."1.2.4";
|
||||
"accepts-1.1.4" = self.by-version."accepts"."1.1.4";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."engine.io-client"."1.6.8" =
|
||||
self.by-version."engine.io-client"."1.6.8";
|
||||
by-version."engine.io-client"."1.6.8" = self.buildNodePackage {
|
||||
name = "engine.io-client-1.6.8";
|
||||
version = "1.6.8";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/engine.io-client/-/engine.io-client-1.6.8.tgz";
|
||||
name = "engine.io-client-1.6.8.tgz";
|
||||
sha1 = "6e2db11648b45e405c46b172ea3e3dac37cc0ceb";
|
||||
};
|
||||
deps = {
|
||||
"has-cors-1.1.0" = self.by-version."has-cors"."1.1.0";
|
||||
"ws-1.0.1" = self.by-version."ws"."1.0.1";
|
||||
"xmlhttprequest-ssl-1.5.1" = self.by-version."xmlhttprequest-ssl"."1.5.1";
|
||||
"component-emitter-1.1.2" = self.by-version."component-emitter"."1.1.2";
|
||||
"indexof-0.0.1" = self.by-version."indexof"."0.0.1";
|
||||
"engine.io-parser-1.2.4" = self.by-version."engine.io-parser"."1.2.4";
|
||||
"debug-2.2.0" = self.by-version."debug"."2.2.0";
|
||||
"parseuri-0.0.4" = self.by-version."parseuri"."0.0.4";
|
||||
"parsejson-0.0.1" = self.by-version."parsejson"."0.0.1";
|
||||
"parseqs-0.0.2" = self.by-version."parseqs"."0.0.2";
|
||||
"component-inherit-0.0.3" = self.by-version."component-inherit"."0.0.3";
|
||||
"yeast-0.1.2" = self.by-version."yeast"."0.1.2";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."engine.io-parser"."1.2.4" =
|
||||
self.by-version."engine.io-parser"."1.2.4";
|
||||
by-version."engine.io-parser"."1.2.4" = self.buildNodePackage {
|
||||
name = "engine.io-parser-1.2.4";
|
||||
version = "1.2.4";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.2.4.tgz";
|
||||
name = "engine.io-parser-1.2.4.tgz";
|
||||
sha1 = "e0897b0bf14e792d4cd2a5950553919c56948c42";
|
||||
};
|
||||
deps = {
|
||||
"after-0.8.1" = self.by-version."after"."0.8.1";
|
||||
"arraybuffer.slice-0.0.6" = self.by-version."arraybuffer.slice"."0.0.6";
|
||||
"base64-arraybuffer-0.1.2" = self.by-version."base64-arraybuffer"."0.1.2";
|
||||
"blob-0.0.4" = self.by-version."blob"."0.0.4";
|
||||
"has-binary-0.1.6" = self.by-version."has-binary"."0.1.6";
|
||||
"utf8-2.1.0" = self.by-version."utf8"."2.1.0";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."has-binary"."0.1.6" =
|
||||
self.by-version."has-binary"."0.1.6";
|
||||
by-version."has-binary"."0.1.6" = self.buildNodePackage {
|
||||
name = "has-binary-0.1.6";
|
||||
version = "0.1.6";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz";
|
||||
name = "has-binary-0.1.6.tgz";
|
||||
sha1 = "25326f39cfa4f616ad8787894e3af2cfbc7b6e10";
|
||||
};
|
||||
deps = {
|
||||
"isarray-0.0.1" = self.by-version."isarray"."0.0.1";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."has-binary"."0.1.7" =
|
||||
self.by-version."has-binary"."0.1.7";
|
||||
by-version."has-binary"."0.1.7" = self.buildNodePackage {
|
||||
name = "has-binary-0.1.7";
|
||||
version = "0.1.7";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz";
|
||||
name = "has-binary-0.1.7.tgz";
|
||||
sha1 = "68e61eb16210c9545a0a5cce06a873912fe1e68c";
|
||||
};
|
||||
deps = {
|
||||
"isarray-0.0.1" = self.by-version."isarray"."0.0.1";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."has-cors"."1.1.0" =
|
||||
self.by-version."has-cors"."1.1.0";
|
||||
by-version."has-cors"."1.1.0" = self.buildNodePackage {
|
||||
name = "has-cors-1.1.0";
|
||||
version = "1.1.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz";
|
||||
name = "has-cors-1.1.0.tgz";
|
||||
sha1 = "5e474793f7ea9843d1bb99c23eef49ff126fff39";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."indexof"."0.0.1" =
|
||||
self.by-version."indexof"."0.0.1";
|
||||
by-version."indexof"."0.0.1" = self.buildNodePackage {
|
||||
name = "indexof-0.0.1";
|
||||
version = "0.0.1";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz";
|
||||
name = "indexof-0.0.1.tgz";
|
||||
sha1 = "82dc336d232b9062179d05ab3293a66059fd435d";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."isarray"."0.0.1" =
|
||||
self.by-version."isarray"."0.0.1";
|
||||
by-version."isarray"."0.0.1" = self.buildNodePackage {
|
||||
name = "isarray-0.0.1";
|
||||
version = "0.0.1";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz";
|
||||
name = "isarray-0.0.1.tgz";
|
||||
sha1 = "8a18acfca9a8f4177e09abfc6038939b05d1eedf";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."json3"."3.2.6" =
|
||||
self.by-version."json3"."3.2.6";
|
||||
by-version."json3"."3.2.6" = self.buildNodePackage {
|
||||
name = "json3-3.2.6";
|
||||
version = "3.2.6";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/json3/-/json3-3.2.6.tgz";
|
||||
name = "json3-3.2.6.tgz";
|
||||
sha1 = "f6efc93c06a04de9aec53053df2559bb19e2038b";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."json3"."3.3.2" =
|
||||
self.by-version."json3"."3.3.2";
|
||||
by-version."json3"."3.3.2" = self.buildNodePackage {
|
||||
name = "json3-3.3.2";
|
||||
version = "3.3.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/json3/-/json3-3.3.2.tgz";
|
||||
name = "json3-3.3.2.tgz";
|
||||
sha1 = "3c0434743df93e2f5c42aee7b19bcb483575f4e1";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."mime-db"."~1.12.0" =
|
||||
self.by-version."mime-db"."1.12.0";
|
||||
by-version."mime-db"."1.12.0" = self.buildNodePackage {
|
||||
name = "mime-db-1.12.0";
|
||||
version = "1.12.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz";
|
||||
name = "mime-db-1.12.0.tgz";
|
||||
sha1 = "3d0c63180f458eb10d325aaa37d7c58ae312e9d7";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."mime-types"."~2.0.4" =
|
||||
self.by-version."mime-types"."2.0.14";
|
||||
by-version."mime-types"."2.0.14" = self.buildNodePackage {
|
||||
name = "mime-types-2.0.14";
|
||||
version = "2.0.14";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz";
|
||||
name = "mime-types-2.0.14.tgz";
|
||||
sha1 = "310e159db23e077f8bb22b748dabfa4957140aa6";
|
||||
};
|
||||
deps = {
|
||||
"mime-db-1.12.0" = self.by-version."mime-db"."1.12.0";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."ms"."0.7.1" =
|
||||
self.by-version."ms"."0.7.1";
|
||||
by-version."ms"."0.7.1" = self.buildNodePackage {
|
||||
name = "ms-0.7.1";
|
||||
version = "0.7.1";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/ms/-/ms-0.7.1.tgz";
|
||||
name = "ms-0.7.1.tgz";
|
||||
sha1 = "9cd13c03adbff25b65effde7ce864ee952017098";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."negotiator"."0.4.9" =
|
||||
self.by-version."negotiator"."0.4.9";
|
||||
by-version."negotiator"."0.4.9" = self.buildNodePackage {
|
||||
name = "negotiator-0.4.9";
|
||||
version = "0.4.9";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/negotiator/-/negotiator-0.4.9.tgz";
|
||||
name = "negotiator-0.4.9.tgz";
|
||||
sha1 = "92e46b6db53c7e421ed64a2bc94f08be7630df3f";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."object-component"."0.0.3" =
|
||||
self.by-version."object-component"."0.0.3";
|
||||
by-version."object-component"."0.0.3" = self.buildNodePackage {
|
||||
name = "object-component-0.0.3";
|
||||
version = "0.0.3";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz";
|
||||
name = "object-component-0.0.3.tgz";
|
||||
sha1 = "f0c69aa50efc95b866c186f400a33769cb2f1291";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."options".">=0.0.5" =
|
||||
self.by-version."options"."0.0.6";
|
||||
by-version."options"."0.0.6" = self.buildNodePackage {
|
||||
name = "options-0.0.6";
|
||||
version = "0.0.6";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/options/-/options-0.0.6.tgz";
|
||||
name = "options-0.0.6.tgz";
|
||||
sha1 = "ec22d312806bb53e731773e7cdaefcf1c643128f";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."parsejson"."0.0.1" =
|
||||
self.by-version."parsejson"."0.0.1";
|
||||
by-version."parsejson"."0.0.1" = self.buildNodePackage {
|
||||
name = "parsejson-0.0.1";
|
||||
version = "0.0.1";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz";
|
||||
name = "parsejson-0.0.1.tgz";
|
||||
sha1 = "9b10c6c0d825ab589e685153826de0a3ba278bcc";
|
||||
};
|
||||
deps = {
|
||||
"better-assert-1.0.2" = self.by-version."better-assert"."1.0.2";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."parseqs"."0.0.2" =
|
||||
self.by-version."parseqs"."0.0.2";
|
||||
by-version."parseqs"."0.0.2" = self.buildNodePackage {
|
||||
name = "parseqs-0.0.2";
|
||||
version = "0.0.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz";
|
||||
name = "parseqs-0.0.2.tgz";
|
||||
sha1 = "9dfe70b2cddac388bde4f35b1f240fa58adbe6c7";
|
||||
};
|
||||
deps = {
|
||||
"better-assert-1.0.2" = self.by-version."better-assert"."1.0.2";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."parseuri"."0.0.4" =
|
||||
self.by-version."parseuri"."0.0.4";
|
||||
by-version."parseuri"."0.0.4" = self.buildNodePackage {
|
||||
name = "parseuri-0.0.4";
|
||||
version = "0.0.4";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz";
|
||||
name = "parseuri-0.0.4.tgz";
|
||||
sha1 = "806582a39887e1ea18dd5e2fe0e01902268e9350";
|
||||
};
|
||||
deps = {
|
||||
"better-assert-1.0.2" = self.by-version."better-assert"."1.0.2";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."socket.io"."*" =
|
||||
self.by-version."socket.io"."1.4.5";
|
||||
by-version."socket.io"."1.4.5" = self.buildNodePackage {
|
||||
name = "socket.io-1.4.5";
|
||||
version = "1.4.5";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/socket.io/-/socket.io-1.4.5.tgz";
|
||||
name = "socket.io-1.4.5.tgz";
|
||||
sha1 = "f202f49eeb9cf7cf6c0971ad75d8d96d451ea4f7";
|
||||
};
|
||||
deps = {
|
||||
"engine.io-1.6.8" = self.by-version."engine.io"."1.6.8";
|
||||
"socket.io-parser-2.2.6" = self.by-version."socket.io-parser"."2.2.6";
|
||||
"socket.io-client-1.4.5" = self.by-version."socket.io-client"."1.4.5";
|
||||
"socket.io-adapter-0.4.0" = self.by-version."socket.io-adapter"."0.4.0";
|
||||
"has-binary-0.1.7" = self.by-version."has-binary"."0.1.7";
|
||||
"debug-2.2.0" = self.by-version."debug"."2.2.0";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
"socket.io" = self.by-version."socket.io"."1.4.5";
|
||||
by-spec."socket.io-adapter"."0.4.0" =
|
||||
self.by-version."socket.io-adapter"."0.4.0";
|
||||
by-version."socket.io-adapter"."0.4.0" = self.buildNodePackage {
|
||||
name = "socket.io-adapter-0.4.0";
|
||||
version = "0.4.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.4.0.tgz";
|
||||
name = "socket.io-adapter-0.4.0.tgz";
|
||||
sha1 = "fb9f82ab1aa65290bf72c3657955b930a991a24f";
|
||||
};
|
||||
deps = {
|
||||
"debug-2.2.0" = self.by-version."debug"."2.2.0";
|
||||
"socket.io-parser-2.2.2" = self.by-version."socket.io-parser"."2.2.2";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."socket.io-client"."1.4.5" =
|
||||
self.by-version."socket.io-client"."1.4.5";
|
||||
by-version."socket.io-client"."1.4.5" = self.buildNodePackage {
|
||||
name = "socket.io-client-1.4.5";
|
||||
version = "1.4.5";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/socket.io-client/-/socket.io-client-1.4.5.tgz";
|
||||
name = "socket.io-client-1.4.5.tgz";
|
||||
sha1 = "400d630c31e7c9579e45173f977e4f5bd8dc7d2e";
|
||||
};
|
||||
deps = {
|
||||
"debug-2.2.0" = self.by-version."debug"."2.2.0";
|
||||
"engine.io-client-1.6.8" = self.by-version."engine.io-client"."1.6.8";
|
||||
"component-bind-1.0.0" = self.by-version."component-bind"."1.0.0";
|
||||
"component-emitter-1.2.0" = self.by-version."component-emitter"."1.2.0";
|
||||
"object-component-0.0.3" = self.by-version."object-component"."0.0.3";
|
||||
"socket.io-parser-2.2.6" = self.by-version."socket.io-parser"."2.2.6";
|
||||
"has-binary-0.1.7" = self.by-version."has-binary"."0.1.7";
|
||||
"indexof-0.0.1" = self.by-version."indexof"."0.0.1";
|
||||
"parseuri-0.0.4" = self.by-version."parseuri"."0.0.4";
|
||||
"to-array-0.1.4" = self.by-version."to-array"."0.1.4";
|
||||
"backo2-1.0.2" = self.by-version."backo2"."1.0.2";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."socket.io-parser"."2.2.2" =
|
||||
self.by-version."socket.io-parser"."2.2.2";
|
||||
by-version."socket.io-parser"."2.2.2" = self.buildNodePackage {
|
||||
name = "socket.io-parser-2.2.2";
|
||||
version = "2.2.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.2.tgz";
|
||||
name = "socket.io-parser-2.2.2.tgz";
|
||||
sha1 = "3d7af6b64497e956b7d9fe775f999716027f9417";
|
||||
};
|
||||
deps = {
|
||||
"debug-0.7.4" = self.by-version."debug"."0.7.4";
|
||||
"json3-3.2.6" = self.by-version."json3"."3.2.6";
|
||||
"component-emitter-1.1.2" = self.by-version."component-emitter"."1.1.2";
|
||||
"isarray-0.0.1" = self.by-version."isarray"."0.0.1";
|
||||
"benchmark-1.0.0" = self.by-version."benchmark"."1.0.0";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."socket.io-parser"."2.2.6" =
|
||||
self.by-version."socket.io-parser"."2.2.6";
|
||||
by-version."socket.io-parser"."2.2.6" = self.buildNodePackage {
|
||||
name = "socket.io-parser-2.2.6";
|
||||
version = "2.2.6";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.6.tgz";
|
||||
name = "socket.io-parser-2.2.6.tgz";
|
||||
sha1 = "38dfd61df50dcf8ab1d9e2091322bf902ba28b99";
|
||||
};
|
||||
deps = {
|
||||
"debug-2.2.0" = self.by-version."debug"."2.2.0";
|
||||
"json3-3.3.2" = self.by-version."json3"."3.3.2";
|
||||
"component-emitter-1.1.2" = self.by-version."component-emitter"."1.1.2";
|
||||
"isarray-0.0.1" = self.by-version."isarray"."0.0.1";
|
||||
"benchmark-1.0.0" = self.by-version."benchmark"."1.0.0";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."to-array"."0.1.4" =
|
||||
self.by-version."to-array"."0.1.4";
|
||||
by-version."to-array"."0.1.4" = self.buildNodePackage {
|
||||
name = "to-array-0.1.4";
|
||||
version = "0.1.4";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz";
|
||||
name = "to-array-0.1.4.tgz";
|
||||
sha1 = "17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."ultron"."1.0.x" =
|
||||
self.by-version."ultron"."1.0.2";
|
||||
by-version."ultron"."1.0.2" = self.buildNodePackage {
|
||||
name = "ultron-1.0.2";
|
||||
version = "1.0.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz";
|
||||
name = "ultron-1.0.2.tgz";
|
||||
sha1 = "ace116ab557cd197386a4e88f4685378c8b2e4fa";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."utf8"."2.1.0" =
|
||||
self.by-version."utf8"."2.1.0";
|
||||
by-version."utf8"."2.1.0" = self.buildNodePackage {
|
||||
name = "utf8-2.1.0";
|
||||
version = "2.1.0";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/utf8/-/utf8-2.1.0.tgz";
|
||||
name = "utf8-2.1.0.tgz";
|
||||
sha1 = "0cfec5c8052d44a23e3aaa908104e8075f95dfd5";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."ws"."1.0.1" =
|
||||
self.by-version."ws"."1.0.1";
|
||||
by-version."ws"."1.0.1" = self.buildNodePackage {
|
||||
name = "ws-1.0.1";
|
||||
version = "1.0.1";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/ws/-/ws-1.0.1.tgz";
|
||||
name = "ws-1.0.1.tgz";
|
||||
sha1 = "7d0b2a2e58cddd819039c29c9de65045e1b310e9";
|
||||
};
|
||||
deps = {
|
||||
"options-0.0.6" = self.by-version."options"."0.0.6";
|
||||
"ultron-1.0.2" = self.by-version."ultron"."1.0.2";
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."xmlhttprequest-ssl"."1.5.1" =
|
||||
self.by-version."xmlhttprequest-ssl"."1.5.1";
|
||||
by-version."xmlhttprequest-ssl"."1.5.1" = self.buildNodePackage {
|
||||
name = "xmlhttprequest-ssl-1.5.1";
|
||||
version = "1.5.1";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.1.tgz";
|
||||
name = "xmlhttprequest-ssl-1.5.1.tgz";
|
||||
sha1 = "3b7741fea4a86675976e908d296d4445961faa67";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
by-spec."yeast"."0.1.2" =
|
||||
self.by-version."yeast"."0.1.2";
|
||||
by-version."yeast"."0.1.2" = self.buildNodePackage {
|
||||
name = "yeast-0.1.2";
|
||||
version = "0.1.2";
|
||||
bin = false;
|
||||
src = fetchurl {
|
||||
url = "http://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz";
|
||||
name = "yeast-0.1.2.tgz";
|
||||
sha1 = "008e06d8094320c372dbc2f8ed76a0ca6c8ac419";
|
||||
};
|
||||
deps = {
|
||||
};
|
||||
optionalDependencies = {
|
||||
};
|
||||
peerDependencies = [];
|
||||
os = [ ];
|
||||
cpu = [ ];
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
[ "socket.io" ]
|
||||
@@ -133,7 +133,7 @@
|
||||
test-framework-hunit test-framework-quickcheck2 text unix
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = http://github.com/tibbe/hashable;
|
||||
homepage = https://github.com/tibbe/hashable;
|
||||
description = "A class for types that can be converted to a hash value";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
@@ -146,7 +146,7 @@
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base transformers ];
|
||||
jailbreak = true;
|
||||
homepage = http://github.com/ekmett/mtl;
|
||||
homepage = https://github.com/ekmett/mtl;
|
||||
description = "Monad classes, using functional dependencies";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
@@ -311,7 +311,7 @@
|
||||
test-framework-hunit test-framework-quickcheck2 text
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = http://github.com/ghcjs/ghcjs-base;
|
||||
homepage = https://github.com/ghcjs/ghcjs-base;
|
||||
description = "Base library for GHCJS";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = http://sourceforge.net/p/ghdl-updates/wiki/Home/;
|
||||
homepage = https://sourceforge.net/p/ghdl-updates/wiki/Home/;
|
||||
description = "Free VHDL simulator";
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; (if flavour == "llvm" then [ "i686-linux" "x86_64-linux" ]
|
||||
|
||||
@@ -25,8 +25,9 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
# The dependencies and their justification are explained at
|
||||
# http://smalltalk.gnu.org/download
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [
|
||||
pkgconfig libtool zip libffi libsigsegv-shared readline gmp gnutls gnome2.gtk
|
||||
libtool zip libffi libsigsegv-shared readline gmp gnutls gnome2.gtk
|
||||
cairo SDL sqlite
|
||||
]
|
||||
++ stdenv.lib.optional emacsSupport emacs;
|
||||
|
||||
@@ -25,13 +25,13 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-${version}";
|
||||
version = "1.8.3";
|
||||
version = "1.8.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "go";
|
||||
rev = "go${version}";
|
||||
sha256 = "0g83xm9gb872rsqzwqr1zw5szq69xhynljj2nglg4yyfi7dm2r1c";
|
||||
sha256 = "1ab021l3v29ciaxp738cjpbkh1chlsl6928672q3i82anmdzn5m5";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
|
||||
187
pkgs/development/compilers/go/1.9.nix
Normal file
187
pkgs/development/compilers/go/1.9.nix
Normal file
@@ -0,0 +1,187 @@
|
||||
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
|
||||
, perl, which, pkgconfig, patch, fetchpatch
|
||||
, pcre, cacert, llvm
|
||||
, Security, Foundation, bash
|
||||
, makeWrapper, git, subversion, mercurial, bazaar }:
|
||||
|
||||
let
|
||||
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
|
||||
clangHack = writeScriptBin "clang" ''
|
||||
#!${stdenv.shell}
|
||||
exec ${stdenv.cc}/bin/clang "$@" 2> >(sed '/ld: warning:.*ignoring unexpected dylib file/ d' 1>&2)
|
||||
'';
|
||||
|
||||
goBootstrap = runCommand "go-bootstrap" {} ''
|
||||
mkdir $out
|
||||
cp -rf ${go_bootstrap}/* $out/
|
||||
chmod -R u+w $out
|
||||
find $out -name "*.c" -delete
|
||||
cp -rf $out/bin/* $out/share/go/bin/
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-${version}";
|
||||
version = "1.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "go";
|
||||
rev = "go${version}";
|
||||
sha256 = "07p4ld07r2nml2bsbfb8h51hqilbqyhhdlia99y1gk7ibvhybv8i";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ];
|
||||
buildInputs = [ pcre ]
|
||||
++ optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ];
|
||||
propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
|
||||
# This source produces shell script at run time,
|
||||
# and thus it is not corrected by patchShebangs.
|
||||
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
|
||||
--replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
|
||||
|
||||
# Disabling the 'os/http/net' tests (they want files not available in
|
||||
# chroot builds)
|
||||
rm src/net/{listen,parse}_test.go
|
||||
rm src/syscall/exec_linux_test.go
|
||||
|
||||
# !!! substituteInPlace does not seems to be effective.
|
||||
# The os test wants to read files in an existing path. Just don't let it be /usr/bin.
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
|
||||
# Disable the unix socket test
|
||||
sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
|
||||
# Disable the hostname test
|
||||
sed -i '/TestHostname/areturn' src/os/os_test.go
|
||||
# ParseInLocation fails the test
|
||||
sed -i '/TestParseInSydney/areturn' src/time/format_test.go
|
||||
# Remove the api check as it never worked
|
||||
sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
|
||||
# Remove the coverage test as we have removed this utility
|
||||
sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go
|
||||
# Remove the timezone naming test
|
||||
sed -i '/TestLoadFixed/areturn' src/time/time_test.go
|
||||
# Remove disable setgid test
|
||||
sed -i '/TestRespectSetgidDir/areturn' src/cmd/go/internal/work/build_test.go
|
||||
# Remove cert tests that conflict with NixOS's cert resolution
|
||||
sed -i '/TestEnvVars/areturn' src/crypto/x509/root_unix_test.go
|
||||
|
||||
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
|
||||
sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
|
||||
|
||||
# Disable cgo lookup tests not works, they depend on resolver
|
||||
rm src/net/cgo_unix_test.go
|
||||
|
||||
'' + optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
|
||||
'' + optionalString stdenv.isArm ''
|
||||
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
|
||||
echo '#!/usr/bin/env bash' > misc/cgo/testplugin/test.bash
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
substituteInPlace src/race.bash --replace \
|
||||
"sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
|
||||
sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
|
||||
sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
|
||||
sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
|
||||
|
||||
sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
|
||||
sed -i '/TestCredentialNoSetGroups/areturn' src/os/exec/exec_posix_test.go
|
||||
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
|
||||
sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
|
||||
sed -i '/TestRead0/areturn' src/os/os_test.go
|
||||
sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
|
||||
|
||||
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
|
||||
sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
|
||||
|
||||
sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go
|
||||
|
||||
sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
|
||||
|
||||
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
|
||||
|
||||
sed -i '1 a\exit 0' misc/cgo/errors/test.bash
|
||||
'';
|
||||
|
||||
patches =
|
||||
[ ./remove-tools-1.9.patch
|
||||
./ssl-cert-file-1.9.patch
|
||||
./creds-test.patch
|
||||
./remove-test-pie-1.9.patch
|
||||
|
||||
(fetchpatch {
|
||||
url = "https://github.com/golang/go/commit/29415eb2b92e78481897c4161ba99f5b09fa6102.patch";
|
||||
sha256 = "01jkm4b2dazzjnfla7rdd0w2clzplga3zza6ybpmkjkk3i4bp73d";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = optionalString stdenv.isDarwin ''
|
||||
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
|
||||
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
|
||||
'';
|
||||
|
||||
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
||||
GOARCH = if stdenv.isDarwin then "amd64"
|
||||
else if stdenv.system == "i686-linux" then "386"
|
||||
else if stdenv.system == "x86_64-linux" then "amd64"
|
||||
else if stdenv.isArm then "arm"
|
||||
else if stdenv.isAarch64 then "arm64"
|
||||
else throw "Unsupported system";
|
||||
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
|
||||
GO386 = 387; # from Arch: don't assume sse2 on i686
|
||||
CGO_ENABLED = 1;
|
||||
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
|
||||
|
||||
# The go build actually checks for CC=*/clang and does something different, so we don't
|
||||
# just want the generic `cc` here.
|
||||
CC = if stdenv.isDarwin then "clang" else "cc";
|
||||
|
||||
configurePhase = ''
|
||||
mkdir -p $out/share/go/bin
|
||||
export GOROOT=$out/share/go
|
||||
export GOBIN=$GOROOT/bin
|
||||
export PATH=$GOBIN:$PATH
|
||||
'';
|
||||
|
||||
postConfigure = optionalString stdenv.isDarwin ''
|
||||
export PATH=${clangHack}/bin:$PATH
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -r . $GOROOT
|
||||
( cd $GOROOT/src && ./all.bash )
|
||||
|
||||
# (https://github.com/golang/go/wiki/GoGetTools)
|
||||
wrapProgram $out/share/go/bin/go --prefix PATH ":" "${stdenv.lib.makeBinPath [ git subversion mercurial bazaar ]}"
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
rm -r $out/share/go/pkg/bootstrap
|
||||
ln -s $out/share/go/bin $out/bin
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
disallowedReferences = [ go_bootstrap ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.9";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cstrahan orivej wkennington ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
26
pkgs/development/compilers/go/remove-test-pie-1.9.patch
Normal file
26
pkgs/development/compilers/go/remove-test-pie-1.9.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
|
||||
index 73432d31ea..3310f5298d 100644
|
||||
--- a/src/cmd/dist/test.go
|
||||
+++ b/src/cmd/dist/test.go
|
||||
@@ -510,21 +510,6 @@ func (t *tester) registerTests() {
|
||||
})
|
||||
}
|
||||
|
||||
- // Test internal linking of PIE binaries where it is supported.
|
||||
- if t.goos == "linux" && t.goarch == "amd64" && !isAlpineLinux() {
|
||||
- // Issue 18243: We don't have a way to set the default
|
||||
- // dynamic linker used in internal linking mode. So
|
||||
- // this test is skipped on Alpine.
|
||||
- t.tests = append(t.tests, distTest{
|
||||
- name: "pie_internal",
|
||||
- heading: "internal linking of -buildmode=pie",
|
||||
- fn: func(dt *distTest) error {
|
||||
- t.addCmd(dt, "src", "go", "test", "reflect", "-short", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60), t.tags(), t.runFlag(""))
|
||||
- return nil
|
||||
- },
|
||||
- })
|
||||
- }
|
||||
-
|
||||
// sync tests
|
||||
t.tests = append(t.tests, distTest{
|
||||
name: "sync_cpu",
|
||||
35
pkgs/development/compilers/go/remove-tools-1.9.patch
Normal file
35
pkgs/development/compilers/go/remove-tools-1.9.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
diff --git a/src/go/build/build.go b/src/go/build/build.go
|
||||
index d8163d0172..dd80a70473 100644
|
||||
--- a/src/go/build/build.go
|
||||
+++ b/src/go/build/build.go
|
||||
@@ -1592,7 +1592,7 @@ func init() {
|
||||
}
|
||||
|
||||
// ToolDir is the directory containing build tools.
|
||||
-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
|
||||
+var ToolDir = runtime.GOTOOLDIR()
|
||||
|
||||
// IsLocalImport reports whether the import path is
|
||||
// a local import path, like ".", "..", "./foo", or "../foo".
|
||||
diff --git a/src/runtime/extern.go b/src/runtime/extern.go
|
||||
index 6e6c674d96..e9f62f96dc 100644
|
||||
--- a/src/runtime/extern.go
|
||||
+++ b/src/runtime/extern.go
|
||||
@@ -223,6 +223,17 @@ func GOROOT() string {
|
||||
return sys.DefaultGoroot
|
||||
}
|
||||
|
||||
+// GOTOOLDIR returns the root of the Go tree.
|
||||
+// It uses the GOTOOLDIR environment variable, if set,
|
||||
+// or else the root used during the Go build.
|
||||
+func GOTOOLDIR() string {
|
||||
+ s := gogetenv("GOTOOLDIR")
|
||||
+ if s != "" {
|
||||
+ return s
|
||||
+ }
|
||||
+ return GOROOT() + "/pkg/tool/" + GOOS + "_" + GOARCH
|
||||
+}
|
||||
+
|
||||
// Version returns the Go tree's version string.
|
||||
// It is either the commit hash and date at the time of the build or,
|
||||
// when possible, a release tag like "go1.3".
|
||||
80
pkgs/development/compilers/go/ssl-cert-file-1.9.patch
Normal file
80
pkgs/development/compilers/go/ssl-cert-file-1.9.patch
Normal file
@@ -0,0 +1,80 @@
|
||||
diff --git a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go
|
||||
index 8e80533590..31c0c666ec 100644
|
||||
--- a/src/crypto/x509/root_cgo_darwin.go
|
||||
+++ b/src/crypto/x509/root_cgo_darwin.go
|
||||
@@ -201,11 +201,20 @@ int FetchPEMRoots(CFDataRef *pemRoots, CFDataRef *untrustedPemRoots) {
|
||||
import "C"
|
||||
import (
|
||||
"errors"
|
||||
+ "io/ioutil"
|
||||
+ "os"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func loadSystemRoots() (*CertPool, error) {
|
||||
roots := NewCertPool()
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
|
||||
var data C.CFDataRef = nil
|
||||
var untrustedData C.CFDataRef = nil
|
||||
diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go
|
||||
index bc35a1cf21..21e52bec51 100644
|
||||
--- a/src/crypto/x509/root_darwin.go
|
||||
+++ b/src/crypto/x509/root_darwin.go
|
||||
@@ -81,18 +81,26 @@ func execSecurityRoots() (*CertPool, error) {
|
||||
)
|
||||
}
|
||||
|
||||
- cmd := exec.Command("/usr/bin/security", args...)
|
||||
- data, err := cmd.Output()
|
||||
- if err != nil {
|
||||
- return nil, err
|
||||
- }
|
||||
-
|
||||
var (
|
||||
mu sync.Mutex
|
||||
roots = NewCertPool()
|
||||
numVerified int // number of execs of 'security verify-cert', for debug stats
|
||||
)
|
||||
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ cmd := exec.Command("/usr/bin/security", args...)
|
||||
+ data, err := cmd.Output()
|
||||
+ if err != nil {
|
||||
+ return nil, err
|
||||
+ }
|
||||
+
|
||||
blockCh := make(chan *pem.Block)
|
||||
var wg sync.WaitGroup
|
||||
|
||||
diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
|
||||
index 65b5a5fdbc..c9c7ac6a74 100644
|
||||
--- a/src/crypto/x509/root_unix.go
|
||||
+++ b/src/crypto/x509/root_unix.go
|
||||
@@ -37,6 +37,13 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate
|
||||
|
||||
func loadSystemRoots() (*CertPool, error) {
|
||||
roots := NewCertPool()
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
|
||||
files := certFiles
|
||||
if f := os.Getenv(certFileEnv); f != "" {
|
||||
@@ -4,8 +4,8 @@ stdenv.mkDerivation {
|
||||
name = "gwt-java-2.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url=http://google-web-toolkit.googlecode.com/files/gwt-2.4.0.zip;
|
||||
sha1 = "a91ac20db0ddd5994ac3cbfb0e8061d5bbf66f88";
|
||||
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-web-toolkit/gwt-2.4.0.zip";
|
||||
sha256 = "1gvyg00vx7fdqgfl2w7nhql78clg3abs6fxxy7m03pprdm5qmm17";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
@@ -17,8 +17,9 @@ stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://code.google.com/webtoolkit/;
|
||||
homepage = http://www.gwtproject.org/;
|
||||
description = "A development toolkit for building and optimizing complex browser-based applications";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, binutils, autoconf, alex, happy, makeStaticLibraries
|
||||
{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, targetPackages, autoconf, alex, happy, makeStaticLibraries
|
||||
, hscolour, xen, automake, gcc, git, zlib, libtool, enableIntegerSimple ? false
|
||||
}:
|
||||
|
||||
@@ -17,14 +17,14 @@ stdenv.mkDerivation rec {
|
||||
sed -i '305 d' Makefile
|
||||
sed -i '309,439 d' Makefile # Removes RPM packaging
|
||||
sed -i '20 d' src/scripts/halvm-cabal.in
|
||||
sed -ie 's|ld |${binutils}/bin/ld |g' src/scripts/ldkernel.in
|
||||
sed -ie 's|ld |${targetPackages.stdenv.cc.bintools}/bin/ld |g' src/scripts/ldkernel.in
|
||||
'';
|
||||
configureFlags = stdenv.lib.optional (!enableIntegerSimple) [ "--enable-gmp" ];
|
||||
propagatedNativeBuildInputs = [ alex happy ];
|
||||
buildInputs =
|
||||
let haskellPkgs = [ alex happy bootPkgs.hscolour bootPkgs.cabal-install bootPkgs.haddock bootPkgs.hpc
|
||||
]; in [ bootPkgs.ghc
|
||||
automake perl git binutils
|
||||
automake perl git targetPackages.stdenv.cc.bintools
|
||||
autoconf xen zlib ncurses.dev
|
||||
libtool gmp ] ++ haskellPkgs;
|
||||
preConfigure = ''
|
||||
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
inherit bootPkgs;
|
||||
cross.config = "halvm";
|
||||
cc = "${gcc}/bin/gcc";
|
||||
ld = "${binutils}/bin/ld";
|
||||
ld = "${targetPackages.stdenv.cc.bintools}/bin/ld";
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -49,5 +49,6 @@ stdenv.mkDerivation rec {
|
||||
platforms = ["x86_64-linux"]; # other platforms don't have Xen
|
||||
maintainers = with stdenv.lib.maintainers; [ dmjio ];
|
||||
inherit (bootPkgs.ghc.meta) license;
|
||||
broken = true; # https://nix-cache.s3.amazonaws.com/log/6i98mhbq9nzzhwr4svlivm4gz91l2w0f-HaLVM-2.4.0.drv
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ in {
|
||||
'';
|
||||
};
|
||||
haxe_3_4 = generic {
|
||||
version = "3.4.2";
|
||||
sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
|
||||
version = "3.4.4";
|
||||
sha256 = "057psarsmz8q2y9pqv5221vpdya241gcy8xnl2wg9wyscn6z1lx6";
|
||||
prePatch = ''
|
||||
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
|
||||
sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, libmemcached, pcre
|
||||
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php
|
||||
{ stdenv, fetchgit, fetchurl, cmake, pkgconfig, boost, libunwind, libmemcached
|
||||
, pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php
|
||||
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
|
||||
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
|
||||
, libxslt, ocaml, freetype, gdb, git, perl, mariadb, gmp, libyaml, libedit
|
||||
, libvpx, imagemagick, fribidi, gperf
|
||||
, libxslt, freetype, gdb, git, perl, mariadb, gmp, libyaml, libedit
|
||||
, libvpx, imagemagick, fribidi, gperf, which, ocamlPackages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hhvm-${version}";
|
||||
version = "3.15.0";
|
||||
version = "3.21";
|
||||
|
||||
# use git version since we need submodules
|
||||
src = fetchgit {
|
||||
url = "https://github.com/facebook/hhvm.git";
|
||||
rev = "92a682ebaa3c85b84857852d8621f528607fe27d";
|
||||
sha256 = "0mn3bfvhdf6b4lflyjfjyr7nppkq505xkaaagk111fqy91rdzd3b";
|
||||
rev = "56483773e2edd9e61782f1901ce40e47959e71b8";
|
||||
sha256 = "0dmdk98nv04m0fv6909gfbsxqlkckn369yi7kadhir0r7vxsj7wa";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -22,10 +22,19 @@ stdenv.mkDerivation rec {
|
||||
[ cmake pkgconfig boost libunwind mariadb.client libmemcached pcre gdb git perl
|
||||
libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
|
||||
oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
|
||||
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml libkrb5
|
||||
gmp libyaml libedit libvpx imagemagick fribidi gperf
|
||||
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt libkrb5
|
||||
gmp libyaml libedit libvpx imagemagick fribidi gperf which
|
||||
ocamlPackages.ocaml ocamlPackages.ocamlbuild
|
||||
];
|
||||
|
||||
patches = [
|
||||
./flexible-array-members-gcc6.patch
|
||||
(fetchurl {
|
||||
url = https://github.com/facebook/hhvm/commit/b506902af2b7c53de6d6c92491c2086472292004.patch;
|
||||
sha256 = "1br7diczqks6b1xjrdsac599fc62m9l17gcx7dvkc0qj54lq7ys4";
|
||||
})
|
||||
];
|
||||
|
||||
enableParallelBuilding = false; # occasional build problems;
|
||||
dontUseCmakeBuildDir = true;
|
||||
NIX_LDFLAGS = "-lpam -L${pam}/lib";
|
||||
@@ -39,10 +48,10 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlags = "-DCMAKE_INSTALL_INCLUDEDIR=include";
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace hphp/util/generate-buildinfo.sh \
|
||||
--replace /bin/bash ${stdenv.shell}
|
||||
substituteInPlace ./configure \
|
||||
--replace "/usr/bin/env bash" ${stdenv.shell}
|
||||
substituteInPlace ./third-party/ocaml/CMakeLists.txt \
|
||||
--replace "/bin/bash" ${stdenv.shell}
|
||||
perl -pi -e 's/([ \t(])(isnan|isinf)\(/$1std::$2(/g' \
|
||||
hphp/runtime/base/*.cpp \
|
||||
hphp/runtime/ext/std/*.cpp \
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
diff --git a/third-party/re2/src/re2/dfa.cc b/third-party/re2/src/re2/dfa.cc
|
||||
index 483f678..3aa3610 100644
|
||||
--- a/third-party/re2/src/re2/dfa.cc
|
||||
+++ b/third-party/re2/src/re2/dfa.cc
|
||||
@@ -101,8 +101,13 @@ class DFA {
|
||||
uint flag_; // Empty string bitfield flags in effect on the way
|
||||
// into this state, along with kFlagMatch if this
|
||||
// is a matching state.
|
||||
- std::atomic<State*> next_[]; // Outgoing arrows from State,
|
||||
- // one per input byte class
|
||||
+// Work around the bug affecting flexible array members in GCC 6.1 and 6.2.
|
||||
+// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932)
|
||||
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 6 && __GNUC_MINOR__ >= 1
|
||||
+ std::atomic<State*> next_[0]; // Outgoing arrows from State, one per input byte class
|
||||
+#else
|
||||
+ std::atomic<State*> next_[]; // Outgoing arrows from State, one per input byte class
|
||||
+#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -2,11 +2,9 @@
|
||||
testedTargets ? ["sse2" "host"] # the default test target is sse4, but that is not supported by all Hydra agents
|
||||
}:
|
||||
|
||||
# TODO: patch LLVM so Skylake-EX works better (patch included in ispc github) - needed for LLVM 3.9?
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.9.1";
|
||||
rev = "v${version}";
|
||||
version = "20170807";
|
||||
rev = "6e0fc2f148e95afad998a7c7f4d7908d29fd8e44";
|
||||
|
||||
inherit testedTargets;
|
||||
|
||||
@@ -16,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "ispc";
|
||||
repo = "ispc";
|
||||
inherit rev;
|
||||
sha256 = "1wwsyvn44hd5iyi5779l5378x096307slpyl29wrsmfp66796693";
|
||||
sha256 = "17fwnfm8a329lgfhjwcvji4h1fm4iqmc28wz23hvgqbpj8lk6qgh";
|
||||
};
|
||||
|
||||
# there are missing dependencies in the Makefile, causing sporadic build failures
|
||||
@@ -60,8 +58,8 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"CXX=${llvmPackages.clang}/bin/clang++"
|
||||
"CLANG=${llvmPackages.clang}/bin/clang"
|
||||
"CXX=${stdenv.cc}/bin/clang++"
|
||||
"CLANG=${stdenv.cc}/bin/clang"
|
||||
"CLANG_INCLUDE=${llvmPackages.clang-unwrapped}/include"
|
||||
];
|
||||
|
||||
|
||||
80
pkgs/development/compilers/jetbrains-jdk/default.nix
Normal file
80
pkgs/development/compilers/jetbrains-jdk/default.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
{ stdenv, lib, fetchurl, file, glib, libxml2, libav_0_8, ffmpeg, libxslt
|
||||
, mesa_noglu , xorg, alsaLib, fontconfig, freetype, pango, gtk2, cairo
|
||||
, gdk_pixbuf, atk }:
|
||||
|
||||
# TODO: Investigate building from source instead of patching binaries.
|
||||
# TODO: Binary patching for not just x86_64-linux but also x86_64-darwin i686-linux
|
||||
|
||||
let drv = stdenv.mkDerivation rec {
|
||||
pname = "jetbrainsjdk";
|
||||
version = "152b1036.1";
|
||||
name = pname + "-" + version;
|
||||
|
||||
src = if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbsdk8u${version}_linux_x64.tar.gz";
|
||||
sha256 = "1768f02i3dxdbxn8n29d522h8v0mkgnhpb8ixzq5p54vwjmfl6md";
|
||||
}
|
||||
else
|
||||
abort "unsupported system: ${stdenv.system}";
|
||||
|
||||
nativeBuildInputs = [ file ];
|
||||
|
||||
unpackCmd = "mkdir jdk; pushd jdk; tar -xzf $src; popd";
|
||||
|
||||
installPhase = ''
|
||||
cd ..
|
||||
|
||||
exes=$(file $sourceRoot/bin/* $sourceRoot/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
|
||||
for file in $exes; do
|
||||
paxmark m "$file"
|
||||
done
|
||||
|
||||
mv $sourceRoot $out
|
||||
jrePath=$out/jre
|
||||
'';
|
||||
|
||||
postFixup = let
|
||||
arch = "amd64";
|
||||
rSubPaths = [
|
||||
"lib/${arch}/jli"
|
||||
"lib/${arch}/server"
|
||||
"lib/${arch}/xawt"
|
||||
"lib/${arch}"
|
||||
];
|
||||
in ''
|
||||
rpath+="''${rpath:+:}${stdenv.lib.concatStringsSep ":" (map (a: "$jrePath/${a}") rSubPaths)}"
|
||||
find $out -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
||||
'';
|
||||
|
||||
rpath = lib.makeLibraryPath ([
|
||||
stdenv.cc.cc stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu
|
||||
alsaLib fontconfig freetype pango gtk2 cairo gdk_pixbuf atk
|
||||
] ++ (with xorg; [
|
||||
libX11 libXext libXtst libXi libXp libXt libXrender libXxf86vm
|
||||
]));
|
||||
|
||||
passthru.home = drv;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An OpenJDK fork to better support Jetbrains's products.";
|
||||
longDescription = ''
|
||||
JetBrains Runtime is a runtime environment for running IntelliJ Platform
|
||||
based products on Windows, Mac OS X, and Linux. JetBrains Runtime is
|
||||
based on OpenJDK project with some modifications. These modifications
|
||||
include: Subpixel Anti-Aliasing, enhanced font rendering on Linux, HiDPI
|
||||
support, ligatures, some fixes for native crashes not presented in
|
||||
official build, and other small enhancements.
|
||||
|
||||
JetBrains Runtime is not a certified build of OpenJDK. Please, use at
|
||||
your own risk.
|
||||
'';
|
||||
homepage = "https://bintray.com/jetbrains/intellij-jdk/";
|
||||
licenses = licenses.gpl2;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = with platforms; [ "x86_64-linux" ];
|
||||
};
|
||||
}; in drv
|
||||
@@ -27,5 +27,6 @@ stdenv.mkDerivation rec {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = ["x86_64-linux"]; # 32 bit builds are broken
|
||||
maintainers = with stdenv.lib.maintainers; [ aforemny thoughtpolice ];
|
||||
broken = true; # https://hydra.nixos.org/build/61700723
|
||||
};
|
||||
}
|
||||
|
||||
191
pkgs/development/compilers/julia/0.6.nix
Normal file
191
pkgs/development/compilers/julia/0.6.nix
Normal file
@@ -0,0 +1,191 @@
|
||||
{ stdenv, fetchgit, fetchurl, fetchzip
|
||||
# build tools
|
||||
, gfortran, m4, makeWrapper, patchelf, perl, which, python2
|
||||
, runCommand
|
||||
, paxctl
|
||||
# libjulia dependencies
|
||||
, libunwind, readline, utf8proc, zlib
|
||||
, llvm, libffi, ncurses
|
||||
# standard library dependencies
|
||||
, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
|
||||
# linear algebra
|
||||
, openblas, arpack, suitesparse
|
||||
# Darwin frameworks
|
||||
, CoreServices, ApplicationServices
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
# All dependencies must use the same OpenBLAS.
|
||||
let
|
||||
arpack_ = arpack;
|
||||
suitesparse_ = suitesparse;
|
||||
in
|
||||
let
|
||||
arpack = arpack_.override { inherit openblas; };
|
||||
suitesparse = suitesparse_.override { inherit openblas; };
|
||||
in
|
||||
|
||||
let
|
||||
dsfmtVersion = "2.2.3";
|
||||
dsfmt = fetchurl {
|
||||
url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmtVersion}.tar.gz";
|
||||
sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42";
|
||||
};
|
||||
|
||||
libuvVersion = "52d72a52cc7ccd570929990f010ed16e2ec604c8";
|
||||
libuv = fetchurl {
|
||||
url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}";
|
||||
sha256 = "1vldy94sfmlfqmi14126g590wi61fv78rzh7afk82zkipaixvak8";
|
||||
};
|
||||
|
||||
rmathVersion = "0.1";
|
||||
rmath-julia = fetchurl {
|
||||
url = "https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v${rmathVersion}";
|
||||
sha256 = "0ai5dhjc43zcvangz123ryxmlbm51s21rg13bllwyn98w67arhb4";
|
||||
};
|
||||
|
||||
virtualenvVersion = "15.0.0";
|
||||
virtualenv = fetchurl {
|
||||
url = "mirror://pypi/v/virtualenv/virtualenv-${virtualenvVersion}.tar.gz";
|
||||
sha256 = "06fw4liazpx5vf3am45q2pdiwrv0id7ckv7n6zmpml29x6vkzmkh";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "julia";
|
||||
version = "0.6.0";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${name}.tar.gz";
|
||||
sha256 = "19xk2cs43lnsy9y0d8wmxj7ich908ipb40vkf7xg9031x272brxw";
|
||||
};
|
||||
prePatch = ''
|
||||
mkdir deps/srccache
|
||||
cp "${dsfmt}" "./deps/srccache/dsfmt-${dsfmtVersion}.tar.gz"
|
||||
cp "${rmath-julia}" "./deps/srccache/Rmath-julia-${rmathVersion}.tar.gz"
|
||||
cp "${libuv}" "./deps/srccache/libuv-${libuvVersion}.tar.gz"
|
||||
cp "${virtualenv}" "./deps/srccache/virtualenv-${virtualenvVersion}.tar.gz"
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./0001.1-use-system-utf8proc.patch
|
||||
./0002-use-system-suitesparse.patch
|
||||
] ++ stdenv.lib.optional stdenv.needsPax ./0004-hardened.patch;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs . contrib
|
||||
for i in backtrace replutil cmdlineargs compile; do
|
||||
mv test/$i.jl{,.off}
|
||||
touch test/$i.jl
|
||||
done
|
||||
|
||||
sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i test/libgit2.jl
|
||||
sed -e 's/Failed to resolve /failed to resolve /g' -i test/libgit2.jl
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr
|
||||
pcre2.dev openblas openlibm openspecfun readline suitesparse utf8proc
|
||||
zlib llvm
|
||||
]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices]
|
||||
;
|
||||
|
||||
nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ]
|
||||
++ stdenv.lib.optional stdenv.needsPax paxctl;
|
||||
|
||||
makeFlags =
|
||||
let
|
||||
arch = head (splitString "-" stdenv.system);
|
||||
march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
|
||||
or (throw "unsupported architecture: ${arch}");
|
||||
# Julia requires Pentium 4 (SSE2) or better
|
||||
cpuTarget = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
|
||||
or (throw "unsupported architecture: ${arch}");
|
||||
in [
|
||||
"ARCH=${arch}"
|
||||
"MARCH=${march}"
|
||||
"JULIA_CPU_TARGET=${cpuTarget}"
|
||||
"PREFIX=$(out)"
|
||||
"prefix=$(out)"
|
||||
"SHELL=${stdenv.shell}"
|
||||
|
||||
"USE_SYSTEM_BLAS=1"
|
||||
"USE_BLAS64=${if openblas.blas64 then "1" else "0"}"
|
||||
"LIBBLAS=-lopenblas"
|
||||
"LIBBLASNAME=libopenblas"
|
||||
|
||||
"USE_SYSTEM_LAPACK=1"
|
||||
"LIBLAPACK=-lopenblas"
|
||||
"LIBLAPACKNAME=libopenblas"
|
||||
|
||||
"USE_SYSTEM_SUITESPARSE=1"
|
||||
"SUITESPARSE_LIB=-lsuitesparse"
|
||||
"SUITESPARSE_INC=-I${suitesparse}/include"
|
||||
|
||||
"USE_SYSTEM_ARPACK=1"
|
||||
"USE_SYSTEM_FFTW=1"
|
||||
"USE_SYSTEM_GMP=1"
|
||||
"USE_SYSTEM_LIBGIT2=1"
|
||||
"USE_SYSTEM_LIBUNWIND=1"
|
||||
|
||||
"USE_SYSTEM_LLVM=1"
|
||||
"LLVM_VER=3.9.1"
|
||||
|
||||
"USE_SYSTEM_MPFR=1"
|
||||
"USE_SYSTEM_OPENLIBM=1"
|
||||
"USE_SYSTEM_OPENSPECFUN=1"
|
||||
"USE_SYSTEM_PATCHELF=1"
|
||||
"USE_SYSTEM_PCRE=1"
|
||||
"PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config"
|
||||
"PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
|
||||
"USE_SYSTEM_READLINE=1"
|
||||
"USE_SYSTEM_UTF8PROC=1"
|
||||
"USE_SYSTEM_ZLIB=1"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-fPIC" ];
|
||||
|
||||
LD_LIBRARY_PATH = makeLibraryPath [
|
||||
arpack fftw fftwSinglePrec gmp libgit2 mpfr openblas openlibm
|
||||
openspecfun pcre2 suitesparse llvm
|
||||
];
|
||||
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
checkTarget = "testall";
|
||||
# Julia's tests require read/write access to $HOME
|
||||
preCheck = ''
|
||||
export HOME="$NIX_BUILD_TOP"
|
||||
set
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile
|
||||
sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out/bin/julia" "$out/bin/julia-debug"; do
|
||||
wrapProgram "$prog" \
|
||||
--prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:$out/lib/julia" \
|
||||
--prefix PATH : "${stdenv.lib.makeBinPath [ curl ]}"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "High-level performance-oriented dynamical language for technical computing";
|
||||
homepage = https://julialang.org/;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = with stdenv.lib.maintainers; [ raskin ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
||||
broken = stdenv.isi686;
|
||||
};
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
{ stdenv, fetchurl, makeWrapper, jre, unzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.1.4-2";
|
||||
version = "1.1.51";
|
||||
name = "kotlin-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
|
||||
sha256 = "09sikwk5xxn4b30icbq28mjs4lm9xbj0bv5yjx75r165iz65g2cv";
|
||||
sha256 = "1kbwyldfyyd20rnrl5yvyvqiqj9b3v6543vhlqsh5swhhc9nnd0b";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ jre ] ;
|
||||
|
||||
103
pkgs/development/compilers/ldc/default.nix
Normal file
103
pkgs/development/compilers/ldc/default.nix
Normal file
@@ -0,0 +1,103 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, llvm, dmd, curl, tzdata, python,
|
||||
lit, gdb, unzip, darwin }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ldc-${version}";
|
||||
version = "1.3.0";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "ldc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ac3j4cwwgjpayhijxx4d6478bc3iqksjxkd7xp7byx7k8w1ppdl";
|
||||
name = "ldc-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "druntime";
|
||||
rev = "ldc-v${version}";
|
||||
sha256 = "1m13370wnj3sizqk3sdpzi9am5d24srf27d613qblhqa9n8vwz30";
|
||||
name = "druntime-ldc-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "phobos";
|
||||
rev = "ldc-v${version}";
|
||||
sha256 = "0fhcdfi7a00plwj27ysfyv783nhk0kspq7hawf6vbsl3s1nyvn8g";
|
||||
name = "phobos-ldc-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "dmd-testsuite";
|
||||
rev = "ldc-v${version}";
|
||||
sha256 = "0dmdkp220gqhxjrmrjfkf0vsvylwfaj70hswavq4q3v4dg17pzmj";
|
||||
name = "dmd-testsuite-ldc-v${version}-src";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
postUnpack = ''
|
||||
mv ldc-v${version}-src/* .
|
||||
|
||||
mv druntime-ldc-v${version}-src/* runtime/druntime
|
||||
|
||||
mv phobos-ldc-v${version}-src/* runtime/phobos
|
||||
|
||||
mv dmd-testsuite-ldc-v${version}-src/* tests/d2/dmd-testsuite
|
||||
|
||||
# Remove cppa test for now because it doesn't work.
|
||||
rm tests/d2/dmd-testsuite/runnable/cppa.d
|
||||
rm tests/d2/dmd-testsuite/runnable/extra-files/cppb.cpp
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace runtime/phobos/std/net/curl.d \
|
||||
--replace libcurl.so ${curl.out}/lib/libcurl.so
|
||||
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace runtime/phobos/std/datetime.d \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace driver/tool.cpp \
|
||||
--replace "gcc" "clang"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake llvm dmd python lit gdb unzip ]
|
||||
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
]);
|
||||
|
||||
buildInputs = [ curl tzdata stdenv.cc ];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray=("-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc")
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
export DMD=$PWD/bin/ldc2
|
||||
'';
|
||||
|
||||
makeFlags = [ "DMD=$DMD" ];
|
||||
|
||||
# disable check phase because some tests are not working with sandboxing
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
ctest -j $NIX_BUILD_CORES -V DMD=$DMD
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The LLVM-based D compiler";
|
||||
homepage = https://github.com/ldc-developers/ldc;
|
||||
# from https://github.com/ldc-developers/ldc/blob/master/LICENSE
|
||||
license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
{ stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, perl
|
||||
, groff
|
||||
, cmake
|
||||
, python2
|
||||
, libffi
|
||||
, binutils
|
||||
, libbfd
|
||||
, libxml2
|
||||
, valgrind
|
||||
, ncurses
|
||||
@@ -39,6 +40,22 @@ in stdenv.mkDerivation rec {
|
||||
../fix-llvm-config.patch
|
||||
];
|
||||
|
||||
postPatch = stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
(
|
||||
cd projects/compiler-rt
|
||||
patch -p1 -F3 < ${
|
||||
fetchpatch {
|
||||
name = "sigaltstack.patch"; # for glibc-2.26
|
||||
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
|
||||
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
|
||||
}
|
||||
}
|
||||
|
||||
sed -i "s,#include <pthread.h>,&\n#include <signal.h>,g" \
|
||||
lib/asan/asan_linux.cc
|
||||
)
|
||||
'';
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
preBuild = ''
|
||||
mkdir -p $out/
|
||||
@@ -50,7 +67,7 @@ in stdenv.mkDerivation rec {
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_REQUIRES_RTTI=1"
|
||||
"-DLLVM_BINUTILS_INCDIR=${binutils.dev or binutils}/include"
|
||||
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
] ++ stdenv.lib.optional (!stdenv.isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
||||
|
||||
|
||||
@@ -20,7 +20,11 @@ stdenv.mkDerivation rec {
|
||||
'"${libcxxabi}/lib/libc++abi.dylib"'
|
||||
'';
|
||||
|
||||
patches = [ ./darwin.patch ];
|
||||
patches = [
|
||||
./darwin.patch
|
||||
# glibc 2.26 fix
|
||||
./xlocale-glibc-2.26.patch
|
||||
];
|
||||
|
||||
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/include/__locale b/include/__locale
|
||||
index 3daa1f1..cb8e151 100644
|
||||
--- a/include/__locale
|
||||
+++ b/include/__locale
|
||||
@@ -29,10 +29,10 @@
|
||||
# if __ANDROID_API__ <= 20
|
||||
# include <support/android/locale_bionic.h>
|
||||
# endif
|
||||
-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
+#elif (defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
|| defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
|
||||
# include <xlocale.h>
|
||||
-#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||
+#endif // __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
@@ -1,11 +1,12 @@
|
||||
{ stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, perl
|
||||
, groff
|
||||
, cmake
|
||||
, python
|
||||
, libffi
|
||||
, binutils
|
||||
, libbfd
|
||||
, libxml2
|
||||
, valgrind
|
||||
, ncurses
|
||||
@@ -33,6 +34,28 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
propagatedBuildInputs = [ ncurses zlib ];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
|
||||
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
|
||||
'';
|
||||
|
||||
postPatch = stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
(
|
||||
cd projects/compiler-rt
|
||||
patch -p1 < ${
|
||||
fetchpatch {
|
||||
name = "sigaltstack.patch"; # for glibc-2.26
|
||||
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
|
||||
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
|
||||
}
|
||||
}
|
||||
|
||||
sed -i "s,#include <pthread.h>,&\n#include <signal.h>,g" \
|
||||
lib/asan/asan_linux.cc
|
||||
)
|
||||
'';
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
preBuild = ''
|
||||
mkdir -p $out/
|
||||
@@ -47,7 +70,7 @@ in stdenv.mkDerivation rec {
|
||||
] ++ stdenv.lib.optional enableSharedLibraries
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
++ stdenv.lib.optional (!isDarwin)
|
||||
"-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
|
||||
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||
++ stdenv.lib.optionals ( isDarwin) [
|
||||
"-DCMAKE_CXX_FLAGS=-stdlib=libc++"
|
||||
"-DCAN_TARGET_i386=false"
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
|
||||
{ newScope, stdenv, libstdcxxHook, cmake, libxml2, python2, isl, fetchurl
|
||||
, overrideCC, wrapCC, ccWrapperFun, darwin
|
||||
}:
|
||||
|
||||
let
|
||||
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl version fetch; });
|
||||
|
||||
@@ -22,20 +25,35 @@ let
|
||||
inherit clang-tools-extra_src stdenv;
|
||||
};
|
||||
|
||||
clang = wrapCC self.clang-unwrapped;
|
||||
clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang;
|
||||
|
||||
libstdcxxClang = ccWrapperFun {
|
||||
cc = self.clang-unwrapped;
|
||||
/* FIXME is this right? */
|
||||
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
||||
extraPackages = [ libstdcxxHook ];
|
||||
};
|
||||
|
||||
libcxxClang = ccWrapperFun {
|
||||
cc = self.clang-unwrapped;
|
||||
isClang = true;
|
||||
inherit (self) stdenv;
|
||||
/* FIXME is this right? */
|
||||
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
||||
extraPackages = [ self.libcxx self.libcxxabi ];
|
||||
};
|
||||
|
||||
stdenv = overrideCC stdenv self.clang;
|
||||
stdenv = stdenv.override (drv: {
|
||||
allowedRequisites = null;
|
||||
cc = self.clang;
|
||||
# Don't include the libc++ and libc++abi from the original stdenv.
|
||||
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
|
||||
});
|
||||
|
||||
libcxxStdenv = overrideCC stdenv self.libcxxClang;
|
||||
libcxxStdenv = stdenv.override (drv: {
|
||||
allowedRequisites = null;
|
||||
cc = self.libcxxClang;
|
||||
# Don't include the libc++ and libc++abi from the original stdenv.
|
||||
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
|
||||
});
|
||||
|
||||
lldb = callPackage ./lldb.nix {};
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
./darwin.patch
|
||||
./r242056.patch
|
||||
# glibc 2.26 fix
|
||||
./xlocale-glibc-2.26.patch
|
||||
];
|
||||
|
||||
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/include/__locale b/include/__locale
|
||||
index 1989558..1e42905 100644
|
||||
--- a/include/__locale
|
||||
+++ b/include/__locale
|
||||
@@ -34,10 +34,10 @@
|
||||
# include <support/solaris/xlocale.h>
|
||||
#elif defined(_NEWLIB_VERSION)
|
||||
# include <support/newlib/xlocale.h>
|
||||
-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
+#elif (defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
|| defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
|
||||
# include <xlocale.h>
|
||||
-#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||
+#endif // __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
@@ -1,11 +1,12 @@
|
||||
{ stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, perl
|
||||
, groff
|
||||
, cmake
|
||||
, python2
|
||||
, libffi
|
||||
, binutils
|
||||
, libbfd
|
||||
, libxml2
|
||||
, valgrind
|
||||
, ncurses
|
||||
@@ -45,6 +46,18 @@ in stdenv.mkDerivation rec {
|
||||
# those always succeed has the net effect of disabling all bindings.
|
||||
prePatch = ''
|
||||
substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
|
||||
''
|
||||
+ stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
(
|
||||
cd projects/compiler-rt
|
||||
patch -p1 < ${
|
||||
fetchpatch {
|
||||
name = "sigaltstack.patch"; # for glibc-2.26
|
||||
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
|
||||
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
|
||||
}
|
||||
}
|
||||
)
|
||||
'';
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
@@ -67,7 +80,7 @@ in stdenv.mkDerivation rec {
|
||||
] ++ stdenv.lib.optional enableSharedLibraries
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
++ stdenv.lib.optional (!isDarwin)
|
||||
"-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
|
||||
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||
++ stdenv.lib.optionals ( isDarwin) [
|
||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||
"-DCAN_TARGET_i386=false"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
|
||||
{ newScope, stdenv, libstdcxxHook, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun, darwin }:
|
||||
let
|
||||
callPackage = newScope (self // { inherit stdenv isl version fetch; });
|
||||
|
||||
@@ -22,20 +22,35 @@ let
|
||||
inherit clang-tools-extra_src stdenv;
|
||||
};
|
||||
|
||||
clang = wrapCC self.clang-unwrapped;
|
||||
clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang;
|
||||
|
||||
libstdcxxClang = ccWrapperFun {
|
||||
cc = self.clang-unwrapped;
|
||||
/* FIXME is this right? */
|
||||
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
||||
extraPackages = [ libstdcxxHook ];
|
||||
};
|
||||
|
||||
libcxxClang = ccWrapperFun {
|
||||
cc = self.clang-unwrapped;
|
||||
isClang = true;
|
||||
inherit (self) stdenv;
|
||||
/* FIXME is this right? */
|
||||
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
||||
extraPackages = [ self.libcxx self.libcxxabi ];
|
||||
};
|
||||
|
||||
stdenv = overrideCC stdenv self.clang;
|
||||
stdenv = stdenv.override (drv: {
|
||||
allowedRequisites = null;
|
||||
cc = self.clang;
|
||||
# Don't include the libc++ and libc++abi from the original stdenv.
|
||||
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
|
||||
});
|
||||
|
||||
libcxxStdenv = overrideCC stdenv self.libcxxClang;
|
||||
libcxxStdenv = stdenv.override (drv: {
|
||||
allowedRequisites = null;
|
||||
cc = self.libcxxClang;
|
||||
# Don't include the libc++ and libc++abi from the original stdenv.
|
||||
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
|
||||
});
|
||||
|
||||
lldb = callPackage ./lldb.nix {};
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include")
|
||||
'';
|
||||
|
||||
patches = lib.optional stdenv.isDarwin ./darwin.patch;
|
||||
patches = [
|
||||
# glibc 2.26 fix
|
||||
../../3.9/libc++/xlocale-glibc-2.26.patch
|
||||
] ++ lib.optional stdenv.isDarwin ./darwin.patch;
|
||||
|
||||
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{ stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, perl
|
||||
, groff
|
||||
, cmake
|
||||
, python
|
||||
, libffi
|
||||
, binutils
|
||||
, libbfd
|
||||
, libxml2
|
||||
, valgrind
|
||||
, ncurses
|
||||
@@ -44,7 +45,23 @@ in stdenv.mkDerivation rec {
|
||||
# 10.9. This is a temporary measure until nixpkgs darwin support is
|
||||
# updated.
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
|
||||
sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
|
||||
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
|
||||
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
|
||||
''
|
||||
+ stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
(
|
||||
cd projects/compiler-rt
|
||||
patch -p1 < ${
|
||||
fetchpatch {
|
||||
name = "sigaltstack.patch"; # for glibc-2.26
|
||||
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
|
||||
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
|
||||
}
|
||||
}
|
||||
)
|
||||
'';
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
@@ -62,7 +79,7 @@ in stdenv.mkDerivation rec {
|
||||
] ++ stdenv.lib.optional enableSharedLibraries [
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||
] ++ stdenv.lib.optional (!isDarwin)
|
||||
"-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
|
||||
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||
++ stdenv.lib.optionals ( isDarwin) [
|
||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||
"-DCAN_TARGET_i386=false"
|
||||
@@ -75,7 +92,6 @@ in stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
|
||||
install_name_tool -id $out/lib/libLLVM.dylib $out/lib/libLLVM.dylib
|
||||
ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
|
||||
{ newScope, stdenv, libstdcxxHook, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun, darwin }:
|
||||
let
|
||||
callPackage = newScope (self // { inherit stdenv isl version fetch; });
|
||||
|
||||
@@ -22,20 +22,35 @@ let
|
||||
inherit clang-tools-extra_src stdenv;
|
||||
};
|
||||
|
||||
clang = wrapCC self.clang-unwrapped;
|
||||
clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang;
|
||||
|
||||
libstdcxxClang = ccWrapperFun {
|
||||
cc = self.clang-unwrapped;
|
||||
/* FIXME is this right? */
|
||||
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
||||
extraPackages = [ libstdcxxHook ];
|
||||
};
|
||||
|
||||
libcxxClang = ccWrapperFun {
|
||||
cc = self.clang-unwrapped;
|
||||
isClang = true;
|
||||
inherit (self) stdenv;
|
||||
/* FIXME is this right? */
|
||||
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
||||
extraPackages = [ self.libcxx self.libcxxabi ];
|
||||
};
|
||||
|
||||
stdenv = overrideCC stdenv self.clang;
|
||||
stdenv = stdenv.override (drv: {
|
||||
allowedRequisites = null;
|
||||
cc = self.clang;
|
||||
# Don't include the libc++ and libc++abi from the original stdenv.
|
||||
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
|
||||
});
|
||||
|
||||
libcxxStdenv = overrideCC stdenv self.libcxxClang;
|
||||
libcxxStdenv = stdenv.override (drv: {
|
||||
allowedRequisites = null;
|
||||
cc = self.libcxxClang;
|
||||
# Don't include the libc++ and libc++abi from the original stdenv.
|
||||
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
|
||||
});
|
||||
|
||||
lldb = callPackage ./lldb.nix {};
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include")
|
||||
'';
|
||||
|
||||
patches = lib.optional stdenv.isDarwin ./darwin.patch;
|
||||
patches = [
|
||||
# glibc 2.26 fix
|
||||
./xlocale-glibc-2.26.patch
|
||||
] ++ lib.optional stdenv.isDarwin ./darwin.patch;
|
||||
|
||||
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user