Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
This commit is contained in:
@@ -7,7 +7,7 @@ assert withGui -> gtk2 != null;
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
version = "1.0.6";
|
||||
name = "arduino${stdenv.lib.optionalString (withGui == false) "-core"}";
|
||||
name = "arduino${stdenv.lib.optionalString (withGui == false) "-core"}-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arduino";
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, alex, binary, boxes, cpphs, dataHash, deepseq, emacs
|
||||
, equivalence, filepath, geniplate, happy, hashable, hashtables
|
||||
, haskeline, haskellSrcExts, mtl, parallel, QuickCheck
|
||||
, STMonadTrans, strict, text, time, transformers
|
||||
, unorderedContainers, xhtml, zlib
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "Agda";
|
||||
version = "2.4.2.2";
|
||||
sha256 = "1hxvapnvlkx6imifswc70ng869zll0zfsygivhc2mjyhaiv10i13";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
binary boxes dataHash deepseq equivalence filepath geniplate
|
||||
hashable hashtables haskeline haskellSrcExts mtl parallel
|
||||
QuickCheck STMonadTrans strict text time transformers
|
||||
unorderedContainers xhtml zlib
|
||||
];
|
||||
buildTools = [ alex cpphs emacs happy ];
|
||||
noHaddock = true;
|
||||
jailbreak = true;
|
||||
postInstall = ''
|
||||
$out/bin/agda -c --no-main $(find $out/share -name Primitive.agda)
|
||||
$out/bin/agda-mode compile
|
||||
'';
|
||||
meta = {
|
||||
homepage = "http://wiki.portal.chalmers.se/agda/";
|
||||
description = "A dependently typed functional programming language and proof assistant";
|
||||
license = "unknown";
|
||||
platforms = self.ghc.meta.platforms;
|
||||
maintainers = with self.stdenv.lib.maintainers; [ fuuzetsu ];
|
||||
};
|
||||
})
|
||||
@@ -1,12 +1,12 @@
|
||||
{stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkgconfig, perl, gnome, pango, sqlite, libxml2, zlib, gmp, smlnj }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "aliceml-1.4-493cd356";
|
||||
name = "aliceml-1.4-7d44dc8e";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/aliceml/aliceml";
|
||||
rev = "493cd3565f0bc3b35790185ec358fb91b7b43037";
|
||||
sha256 = "12fbaf0a474e53f40a71f16bf61c52b7ffe044f4d0993e208e69552df3054d45";
|
||||
rev = "7d44dc8e4097c6f85888bbf4ff86d51fe05b0a08";
|
||||
sha256 = "ab2d5bf05c40905b02cb1ec975d4980ae4437757856eeb1f587ede2c45a1917f";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,15 +2,17 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ats2-${version}";
|
||||
version = "0.1.11";
|
||||
version = "0.1.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-${version}.tgz";
|
||||
sha256 = "1dy2f7lxfwcmrk753midr75cy8xs6pqnmqmj9xj0ch479q4pkpsv";
|
||||
sha256 = "1jiki88mzhki74xh5ffw3pali5zs74pa0nylcb8n4ypfvdpqvlhb";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp ];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
description = "Functional programming language with dependent types";
|
||||
homepage = "http://www.ats-lang.org";
|
||||
|
||||
1
pkgs/development/compilers/ats2/setup-hook.sh
Normal file
1
pkgs/development/compilers/ats2/setup-hook.sh
Normal file
@@ -0,0 +1 @@
|
||||
export PATSHOME=@out@/lib/ats2-postiats-@version@
|
||||
@@ -1,7 +1,32 @@
|
||||
{ stdenv, fetchsvn, gcc, glibc, m4, coreutils }:
|
||||
|
||||
/* TODO: there are also MacOS, FreeBSD and Windows versions */
|
||||
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
|
||||
let
|
||||
options = rec {
|
||||
/* TODO: there are also MacOS, FreeBSD and Windows versions */
|
||||
x86_64-linux = {
|
||||
arch = "linuxx86";
|
||||
sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8";
|
||||
runtime = "lx86cl64";
|
||||
kernel = "linuxx8664";
|
||||
};
|
||||
i686-linux = {
|
||||
arch = "linuxx86";
|
||||
sha256 = x86_64-linux.sha256;
|
||||
runtime = "lx86cl";
|
||||
kernel = "linuxx8632";
|
||||
};
|
||||
armv7l-linux = {
|
||||
arch = "linuxarm";
|
||||
sha256 = "0xg9p1q1fpgyfhwjk2hh24vqzddzx5zqff04lycf0vml5qw1gnkv";
|
||||
runtime = "armcl";
|
||||
kernel = "linuxarm";
|
||||
};
|
||||
armv6l-linux = armv7l-linux;
|
||||
};
|
||||
cfg = options.${stdenv.system};
|
||||
in
|
||||
|
||||
assert builtins.hasAttr stdenv.system options;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ccl-${version}";
|
||||
@@ -9,15 +34,15 @@ stdenv.mkDerivation rec {
|
||||
revision = "16313";
|
||||
|
||||
src = fetchsvn {
|
||||
url = http://svn.clozure.com/publicsvn/openmcl/release/1.10/linuxx86/ccl;
|
||||
url = "http://svn.clozure.com/publicsvn/openmcl/release/${version}/${cfg.arch}/ccl";
|
||||
rev = revision;
|
||||
sha256 = "11lmdvzj1mbm7mbr22vjbcrsvinyz8n32a91ms324xqdqpr82ifb";
|
||||
sha256 = cfg.sha256;
|
||||
};
|
||||
|
||||
buildInputs = [ gcc glibc m4 ];
|
||||
|
||||
CCL_RUNTIME = if stdenv.system == "x86_64-linux" then "lx86cl64" else "lx86cl";
|
||||
CCL_KERNEL = if stdenv.system == "x86_64-linux" then "linuxx8664" else "linuxx8632";
|
||||
CCL_RUNTIME = cfg.runtime;
|
||||
CCL_KERNEL = cfg.kernel;
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
|
||||
@@ -45,11 +70,11 @@ stdenv.mkDerivation rec {
|
||||
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Clozure Common Lisp";
|
||||
homepage = http://ccl.clozure.com/;
|
||||
maintainers = with stdenv.lib.maintainers; [ raskin muflax ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = stdenv.lib.licenses.lgpl21;
|
||||
maintainers = with maintainers; [ raskin muflax ];
|
||||
platforms = attrNames options;
|
||||
license = licenses.lgpl21;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, makeWrapper, bootstrap-chicken ? null }:
|
||||
|
||||
let
|
||||
version = "4.9.0.1";
|
||||
version = "4.10.0";
|
||||
platform = with stdenv;
|
||||
if isDarwin then "macosx"
|
||||
else if isCygwin then "cygwin"
|
||||
@@ -16,8 +16,8 @@ stdenv.mkDerivation {
|
||||
binaryVersion = 7;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://code.call-cc.org/releases/4.9.0/chicken-${version}.tar.gz";
|
||||
sha256 = "0598mar1qswfd8hva9nqs88zjn02lzkqd8fzdd21dz1nki1prpq4";
|
||||
url = "http://code.call-cc.org/releases/4.10.0/chicken-${version}.tar.gz";
|
||||
sha256 = "16w96jrhb6qf62fgznk53f55yhfv81damghdjn31k5hirnmza1qf";
|
||||
};
|
||||
|
||||
setupHook = lib.ifEnable (bootstrap-chicken != null) ./setup-hook.sh;
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, bifunctors, clashLib, clashPrelude, filepath, ghcPaths
|
||||
, hashable, haskeline, lens, makeWrapper, mtl, text, transformers, unbound
|
||||
, unorderedContainers, thLift
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "clash-ghc";
|
||||
version = "0.4";
|
||||
sha256 = "0pyv8snrmy7x9gv6xna5rd5chacrdvczcjs7854b80pifhag5c2g";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
bifunctors clashLib clashPrelude filepath ghcPaths hashable
|
||||
haskeline lens mtl text transformers unbound unorderedContainers
|
||||
thLift
|
||||
];
|
||||
buildTools = [ makeWrapper ];
|
||||
postInstall = ''
|
||||
echo ${clashPrelude}
|
||||
wrapProgram $out/bin/clash \
|
||||
--add-flags "-package-db ${clashPrelude}/lib/ghc-${self.ghc.version}/package.conf.d/${clashPrelude.fname}.installedconf" \
|
||||
--add-flags "-package-db ${thLift}/lib/ghc-${self.ghc.version}/package.conf.d/${thLift.fname}.installedconf" \
|
||||
--add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"-package-db\")"
|
||||
'';
|
||||
meta = {
|
||||
homepage = "http://christiaanb.github.io/clash2";
|
||||
description = "CAES Language for Synchronous Hardware";
|
||||
license = "unknown";
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "closure-compiler-${version}";
|
||||
version = "20150315";
|
||||
version = "20150609";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
|
||||
sha256 = "1vzwyhpqbrndg7mri81f1b2yi8cshw5pghvdda9vdxgq465sa52f";
|
||||
sha256 = "0347j50kg41agrvpb29vp69ra912ljhp206z9kbrk84lxpmx19rp";
|
||||
};
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
28
pkgs/development/compilers/colm/default.nix
Normal file
28
pkgs/development/compilers/colm/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ stdenv, fetchurl, makeWrapper, gcc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "colm-${version}";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.colm.net/files/colm/${name}.tar.gz";
|
||||
sha256 = "0kbfipxv3nvggd1a2nahk3jg22iifp2l7lkm55i5r7qkpms5sm3v";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''sh ./test/runtests.sh'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/colm \
|
||||
--prefix PATH ":" ${gcc}/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A programming language for the analysis and transformation of computer languages";
|
||||
homepage = http://www.colm.net/open-source/colm;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +1,37 @@
|
||||
{ stdenv, fetchurl, coq, ocaml, ocamlPackages }:
|
||||
{ stdenv, fetchurl, coq, ocamlPackages
|
||||
, tools ? stdenv.cc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "compcert-${version}";
|
||||
version = "2.4";
|
||||
version = "2.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://compcert.inria.fr/release/${name}.tgz";
|
||||
sha256 = "1qrb1cplx3v5wxn1c46kx67v1j52yznvjm2hkrsdybphhki2pyia";
|
||||
sha256 = "15gxarl2a8mz33fdn8pycj0ccazgmllbg2940n7aqdjlz807p11n";
|
||||
};
|
||||
|
||||
buildInputs = [ coq ocaml ocamlPackages.menhir ];
|
||||
buildInputs = [ coq ] ++ (with ocamlPackages; [ ocaml menhir ]);
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configurePhase = ''
|
||||
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
|
||||
./configure -prefix $out -toolprefix ${stdenv.cc}/bin/ '' +
|
||||
./configure -prefix $out -toolprefix ${tools}/bin/ '' +
|
||||
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
|
||||
|
||||
installTargets = "documentation install";
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $lib/share/doc/compcert
|
||||
mv doc/html $lib/share/doc/compcert/
|
||||
mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
|
||||
mv backend cfrontend common cparser driver flocq ia32 lib \
|
||||
$lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
|
||||
'';
|
||||
|
||||
outputs = [ "out" "lib" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Formally verified C compiler";
|
||||
homepage = "http://compcert.inria.fr";
|
||||
|
||||
67
pkgs/development/compilers/coreclr/default.nix
Normal file
67
pkgs/development/compilers/coreclr/default.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, which
|
||||
, cmake
|
||||
, clang_35
|
||||
, llvmPackages_36
|
||||
, libunwind
|
||||
, gettext
|
||||
, openssl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "coreclr-${version}";
|
||||
version = "git-" + (builtins.substring 0 10 rev);
|
||||
rev = "8c70800b5e8dc5535c379dec4a6fb32f7ab5e878";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dotnet";
|
||||
repo = "coreclr";
|
||||
inherit rev;
|
||||
sha256 = "1galskbnr9kdjjxpx5qywh49400swchhq5f54i16kxyr9k4mvq1f";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
which
|
||||
cmake
|
||||
clang_35
|
||||
llvmPackages_36.llvm
|
||||
llvmPackages_36.lldb
|
||||
libunwind
|
||||
gettext
|
||||
openssl
|
||||
];
|
||||
|
||||
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"
|
||||
|
||||
# Prevent the -nostdinc++ flag to be passed to clang, which causes a compilation error
|
||||
substituteInPlace src/CMakeLists.txt --replace "if(NOT CLR_CMAKE_PLATFORM_DARWIN)" "if(FALSE)"
|
||||
|
||||
patchShebangs build.sh
|
||||
patchShebangs src/pal/tools/gen-buildsys-clang.sh
|
||||
'';
|
||||
|
||||
buildPhase = "./build.sh";
|
||||
|
||||
installPhase = ''
|
||||
pushd bin/Product/Linux.x64.Debug/
|
||||
mkdir -v -p $out/bin
|
||||
cp -v coreconsole corerun crossgen $out/bin
|
||||
cp -rv lib $out
|
||||
cp -v *.so $out/lib
|
||||
cp -rv inc $out/include
|
||||
cp -rv gcinfo $out/include
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = {
|
||||
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;
|
||||
};
|
||||
}
|
||||
@@ -1,62 +1,6 @@
|
||||
{ lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python, zlib
|
||||
, xlibs, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib
|
||||
} :
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-5.5.22";
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run;
|
||||
sha256 = "b997e1dbe95704e0e806e0cedc5fd370a385351fef565c7bae0917baf3a29aa4";
|
||||
}
|
||||
else throw "cudatoolkit does not support platform ${stdenv.system}";
|
||||
|
||||
outputs = [ "out" "sdk" ];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
runtimeDependencies = [
|
||||
ncurses expat python zlib
|
||||
xlibs.libX11 xlibs.libXext xlibs.libXrender xlibs.libXt xlibs.libXtst xlibs.libXi xlibs.libXext
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64";
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
cd pkg/run_files
|
||||
sh cuda-linux64-rel-5.5.22-16488124.run --keep --noexec
|
||||
sh cuda-samples-linux-5.5.22-16488124.run --keep --noexec
|
||||
cd pkg
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
find . -type f -executable -exec patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
'{}' \; || true
|
||||
find . -type f -exec patchelf \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-cc)/lib \
|
||||
--force-rpath \
|
||||
'{}' \; || true
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out $sdk
|
||||
perl ./install-linux.pl --prefix="$out"
|
||||
rm $out/tools/CUDA_Occupancy_Calculator.xls
|
||||
perl ./install-sdk-linux.pl --prefix="$sdk" --cudaprefix="$out"
|
||||
mv $out/include $out/usr_include
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
}
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "5.5.22";
|
||||
sha256 = "b997e1dbe95704e0e806e0cedc5fd370a385351fef565c7bae0917baf3a29aa4";
|
||||
})
|
||||
|
||||
@@ -1,63 +1,6 @@
|
||||
{ lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python, zlib
|
||||
, xlibs, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-6.0.37";
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = http://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run;
|
||||
sha256 = "991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40";
|
||||
}
|
||||
else throw "cudatoolkit does not support platform ${stdenv.system}";
|
||||
|
||||
outputs = [ "out" "sdk" ];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
runtimeDependencies = [
|
||||
ncurses expat python zlib
|
||||
xlibs.libX11 xlibs.libXext xlibs.libXrender xlibs.libXt xlibs.libXtst xlibs.libXi xlibs.libXext
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64";
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
cd pkg/run_files
|
||||
sh cuda-linux64-rel-6.0.37-18176142.run --keep --noexec
|
||||
sh cuda-samples-linux-6.0.37-18176142.run --keep --noexec
|
||||
cd pkg
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
find . -type f -executable -exec patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
'{}' \; || true
|
||||
find . -type f -exec patchelf \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-cc)/lib \
|
||||
--force-rpath \
|
||||
'{}' \; || true
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out $sdk
|
||||
perl ./install-linux.pl --prefix="$out"
|
||||
rm $out/tools/CUDA_Occupancy_Calculator.xls
|
||||
perl ./install-sdk-linux.pl --prefix="$sdk" --cudaprefix="$out"
|
||||
mv $out/include $out/usr_include
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
}
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "6.0.37";
|
||||
sha256 = "991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40";
|
||||
})
|
||||
|
||||
@@ -1,65 +1,6 @@
|
||||
{ lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python, zlib
|
||||
, xlibs, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib
|
||||
}:
|
||||
|
||||
let version = "6.5.19"; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-${version}";
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_${version}_linux_64.run";
|
||||
sha256 = "1x9zdmk8z784d3d35vr2ak1l4h5v4jfjhpxfi9fl9dvjkcavqyaj";
|
||||
}
|
||||
else throw "cudatoolkit does not support platform ${stdenv.system}";
|
||||
|
||||
outputs = [ "out" "sdk" ];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
runtimeDependencies = [
|
||||
ncurses expat python zlib
|
||||
xlibs.libX11 xlibs.libXext xlibs.libXrender xlibs.libXt xlibs.libXtst xlibs.libXi xlibs.libXext
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64";
|
||||
|
||||
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
|
||||
cd pkg
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
find . -type f -executable -exec patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
'{}' \; || true
|
||||
find . -type f -exec patchelf \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-cc)/lib \
|
||||
--force-rpath \
|
||||
'{}' \; || true
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out $sdk
|
||||
perl ./install-linux.pl --prefix="$out"
|
||||
rm $out/tools/CUDA_Occupancy_Calculator.xls
|
||||
perl ./install-sdk-linux.pl --prefix="$sdk" --cudaprefix="$out"
|
||||
mv $out/include $out/usr_include
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
}
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "6.5.19";
|
||||
sha256 = "1x9zdmk8z784d3d35vr2ak1l4h5v4jfjhpxfi9fl9dvjkcavqyaj";
|
||||
})
|
||||
|
||||
7
pkgs/development/compilers/cudatoolkit/7.0.nix
Normal file
7
pkgs/development/compilers/cudatoolkit/7.0.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "7.0.28";
|
||||
sha256 = "1km5hpiimx11jcazg0h3mjzk220klwahs2vfqhjavpds5ff2wafi";
|
||||
url = "http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run";
|
||||
})
|
||||
75
pkgs/development/compilers/cudatoolkit/generic.nix
Normal file
75
pkgs/development/compilers/cudatoolkit/generic.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python, zlib
|
||||
, xorg, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
|
||||
# generic inputs
|
||||
, version, sha256, url ? null, ...
|
||||
} :
|
||||
|
||||
let
|
||||
# eg, 5.5.22 => 5_5
|
||||
mkShort = let str = stdenv.lib.strings;
|
||||
take = stdenv.lib.lists.take;
|
||||
in v: str.concatStringsSep "_" (take 2 (str.splitString "." v));
|
||||
shortVer = mkShort version;
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "cudatoolkit-${version}";
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = if url != null then url else "http://developer.download.nvidia.com/compute/cuda/${shortVer}/rel/installers/cuda_${version}_linux_64.run";
|
||||
sha256 = sha256;
|
||||
}
|
||||
else throw "cudatoolkit does not support platform ${stdenv.system}";
|
||||
|
||||
outputs = [ "out" "sdk" ];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
runtimeDependencies = [
|
||||
ncurses expat python zlib glibc
|
||||
xorg.libX11 xorg.libXext xorg.libXrender xorg.libXt xorg.libXtst xorg.libXi xorg.libXext
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64";
|
||||
|
||||
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
|
||||
cd pkg
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
find . -type f -executable -exec patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
'{}' \; || true
|
||||
find . -type f -exec patchelf \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-cc)/lib \
|
||||
--force-rpath \
|
||||
'{}' \; || true
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out $sdk
|
||||
perl ./install-linux.pl --prefix="$out"
|
||||
rm $out/tools/CUDA_Occupancy_Calculator.xls
|
||||
perl ./install-sdk-linux.pl --prefix="$sdk" --cudaprefix="$out"
|
||||
|
||||
# let's remove the 32-bit libraries, they confuse the lib64->lib mover
|
||||
rm -rf $out/lib
|
||||
|
||||
# Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
|
||||
if [ -d "$out"/cuda-samples ]; then
|
||||
mv "$out"/cuda-samples "$out"/samples
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
addIncludePath () {
|
||||
if test -d "$1/usr_include"
|
||||
then
|
||||
export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE} -I$1/usr_include"
|
||||
fi
|
||||
}
|
||||
|
||||
envHooks=(${envHooks[@]} addIncludePath)
|
||||
@@ -1,15 +1,21 @@
|
||||
{ stdenv, fetchurl, unzip, curl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "dmd-2.067.0";
|
||||
name = "dmd-2.067.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://downloads.dlang.org/releases/2015/dmd.2.067.0.zip;
|
||||
sha256 = "0b1b65694846ef3430de1de341c8cf353151a1a39656e6a1065fe56bc90fb60b";
|
||||
url = http://downloads.dlang.org/releases/2015/dmd.2.067.1.zip;
|
||||
sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip curl ];
|
||||
|
||||
# Allow to use "clang++", commented in Makefile
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace src/dmd/posix.mak --replace g++ clang++
|
||||
'';
|
||||
|
||||
# Buid and install are based on http://wiki.dlang.org/Building_DMD
|
||||
buildPhase = ''
|
||||
cd src/dmd
|
||||
make -f posix.mak INSTALL_DIR=$out
|
||||
@@ -34,8 +40,9 @@ stdenv.mkDerivation {
|
||||
|
||||
cd ../phobos
|
||||
mkdir $out/lib
|
||||
${let bits = if stdenv.is64bit then "64" else "32"; in
|
||||
"cp generated/linux/release/${bits}/libphobos2.a $out/lib"
|
||||
${let bits = if stdenv.is64bit then "64" else "32";
|
||||
osname = if stdenv.isDarwin then "osx" else "linux"; in
|
||||
"cp generated/${osname}/release/${bits}/libphobos2.a $out/lib"
|
||||
}
|
||||
|
||||
cp -r std $out/include/d2
|
||||
@@ -44,7 +51,7 @@ stdenv.mkDerivation {
|
||||
cd $out/bin
|
||||
tee dmd.conf << EOF
|
||||
[Environment]
|
||||
DFLAGS=-I$out/include/d2 -L-L$out/lib -L--no-warn-search-mismatch -L--export-dynamic
|
||||
DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--no-warn-search-mismatch -L--export-dynamic"}
|
||||
EOF
|
||||
'';
|
||||
|
||||
@@ -55,4 +62,3 @@ stdenv.mkDerivation {
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
24
pkgs/development/compilers/dtc/default.nix
Normal file
24
pkgs/development/compilers/dtc/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ stdenv, fetchgit, flex, bison }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dtc-${version}";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "0z7yrv0sdhsh5wwy7yd1fvs4pqaq0n9m5i8w65lyibg77ahkasdg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flex bison ];
|
||||
|
||||
installFlags = [ "INSTALL=install" "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Device Tree Compiler";
|
||||
homepage = https://git.kernel.org/cgit/utils/dtc/dtc.git;
|
||||
license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD
|
||||
maintainers = [ maintainers.dezgeg ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -26,14 +26,6 @@ stdenv.mkDerivation {
|
||||
src = fetchurl {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
patches = [ ./libffi-prefix.patch ];
|
||||
preConfigure = ''
|
||||
(cd src ; libtoolize -f)
|
||||
(cd src ; autoheader -f)
|
||||
(cd src ; aclocal)
|
||||
(cd src ; automake --add-missing -c)
|
||||
(cd src ; autoconf -f)
|
||||
'';
|
||||
configureFlags = [
|
||||
"--enable-threads"
|
||||
"--with-gmp-prefix=${gmp}"
|
||||
|
||||
@@ -35,7 +35,6 @@ edk2 = stdenv.mkDerivation {
|
||||
description = "Intel EFI development kit";
|
||||
homepage = http://sourceforge.net/projects/edk2/;
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
||||
platforms = ["x86_64-linux" "i686-linux"];
|
||||
};
|
||||
|
||||
@@ -47,7 +46,7 @@ edk2 = stdenv.mkDerivation {
|
||||
configurePhase = ''
|
||||
mkdir -v Conf
|
||||
sed -e 's|Nt32Pkg/Nt32Pkg.dsc|${projectDscPath}|' -e \
|
||||
's|MYTOOLS|GCC48|' -e 's|IA32|${targetArch}|' -e 's|DEBUG|RELEASE|'\
|
||||
's|MYTOOLS|GCC49|' -e 's|IA32|${targetArch}|' -e 's|DEBUG|RELEASE|'\
|
||||
< ${edk2}/BaseTools/Conf/target.template > Conf/target.txt
|
||||
sed -e 's|DEFINE GCC48_IA32_PREFIX = /usr/bin/|DEFINE GCC48_IA32_PREFIX = ""|' \
|
||||
-e 's|DEFINE GCC48_X64_PREFIX = /usr/bin/|DEFINE GCC48_X64_PREFIX = ""|' \
|
||||
|
||||
81
pkgs/development/compilers/elm/default.nix
Normal file
81
pkgs/development/compilers/elm/default.nix
Normal file
@@ -0,0 +1,81 @@
|
||||
{ lib, stdenv, buildEnv, haskell, nodejs, fetchurl, fetchpatch, makeWrapper }:
|
||||
|
||||
let
|
||||
makeElmStuff = deps:
|
||||
let json = builtins.toJSON (lib.mapAttrs (name: info: info.version) deps);
|
||||
cmds = lib.mapAttrsToList (name: info: let
|
||||
pkg = stdenv.mkDerivation {
|
||||
|
||||
name = lib.replaceChars ["/"] ["-"] name + "-${info.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/${name}/archive/${info.version}.tar.gz";
|
||||
meta.homepage = "https://github.com/${name}/";
|
||||
inherit (info) sha256;
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out
|
||||
'';
|
||||
|
||||
};
|
||||
in ''
|
||||
mkdir -p elm-stuff/packages/${name}
|
||||
ln -s ${pkg} elm-stuff/packages/${name}/${info.version}
|
||||
'') deps;
|
||||
in ''
|
||||
export HOME=/tmp
|
||||
mkdir elm-stuff
|
||||
cat > elm-stuff/exact-dependencies.json <<EOF
|
||||
${json}
|
||||
EOF
|
||||
'' + lib.concatStrings cmds;
|
||||
|
||||
hsPkgs = haskell.packages.ghc7102.override {
|
||||
overrides = self: super:
|
||||
let hlib = haskell.lib;
|
||||
elmRelease = import ./packages/release.nix { inherit (self) callPackage; };
|
||||
elmPkgs' = elmRelease.packages;
|
||||
elmPkgs = elmPkgs' // {
|
||||
|
||||
elm-reactor = hlib.overrideCabal elmPkgs'.elm-reactor (drv: {
|
||||
buildTools = drv.buildTools or [] ++ [ self.elm-make ];
|
||||
patches = [ (fetchpatch {
|
||||
url = "https://github.com/elm-lang/elm-reactor/commit/ca4d91d3fc7c6f72aa802d79fd1563ab5f3c4f2c.patch";
|
||||
sha256 = "0cjcv5rvrq7v1j8n8w87ljgza522cm32cy4n4rq5ysjq3qnaxwcq";
|
||||
}) ];
|
||||
preConfigure = makeElmStuff (import ./packages/elm-reactor-elm.nix);
|
||||
});
|
||||
|
||||
elm-package = hlib.appendPatch elmPkgs'.elm-package (fetchpatch {
|
||||
url = "https://github.com/elm-lang/elm-package/commit/af517f2ffe15f8ec1d8c38f01ce188bbdefea47a.patch";
|
||||
sha256 = "1l66i4qssp0mcq8yypcn1ps3n2bskyfiqf0qr8gan6wz3znafpy9";
|
||||
});
|
||||
|
||||
elm-repl = hlib.overrideCabal elmPkgs'.elm-repl (drv: {
|
||||
doCheck = false;
|
||||
buildTools = drv.buildTools or [] ++ [ makeWrapper ];
|
||||
postInstall =
|
||||
let bins = lib.makeSearchPath "bin" [ nodejs self.elm-make ];
|
||||
in ''
|
||||
wrapProgram $out/bin/elm-repl \
|
||||
--prefix PATH ':' ${bins}
|
||||
'';
|
||||
});
|
||||
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
elmVersion = elmRelease.version;
|
||||
};
|
||||
};
|
||||
in hsPkgs.elmPkgs // {
|
||||
elm = buildEnv {
|
||||
name = "elm-${hsPkgs.elmVersion}";
|
||||
paths = lib.mapAttrsToList (name: pkg: pkg) hsPkgs.elmPkgs;
|
||||
pathsToLink = [ "/bin" ];
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, aeson, aesonPretty, binary, blazeHtml, blazeMarkup
|
||||
, cmdargs, filemanip, filepath, HUnit, indents, languageEcmascript
|
||||
, languageGlsl, mtl, parsec, QuickCheck, testFramework
|
||||
, testFrameworkHunit, testFrameworkQuickcheck2, text, transformers
|
||||
, unionFind, unorderedContainers
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "elm-compiler";
|
||||
version = "0.14.1";
|
||||
sha256 = "0my04mipgia5qw02nzzrzc4kq3vl7bv75rzrsmd2bdb2wll1k94f";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson aesonPretty binary blazeHtml blazeMarkup cmdargs filepath
|
||||
indents languageEcmascript languageGlsl mtl parsec text
|
||||
transformers unionFind unorderedContainers
|
||||
];
|
||||
testDepends = [
|
||||
aeson aesonPretty binary blazeHtml blazeMarkup cmdargs filemanip
|
||||
filepath HUnit indents languageEcmascript languageGlsl mtl parsec
|
||||
QuickCheck testFramework testFrameworkHunit
|
||||
testFrameworkQuickcheck2 text transformers unionFind
|
||||
unorderedContainers
|
||||
];
|
||||
meta = {
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "Values to help with elm-package, elm-make, and elm-lang.org.";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,25 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, aeson, aesonPretty, ansiWlPprint, binary, Elm, filepath
|
||||
, HTTP, httpClient, httpClientTls, httpTypes, mtl, network
|
||||
, optparseApplicative, vector
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "elm-get";
|
||||
version = "0.1.3";
|
||||
sha256 = "1did7vjd1h2kh5alndd2b63zi8b1m9hf6k1k75yxwvw6f6mz5i4q";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson aesonPretty ansiWlPprint binary Elm filepath HTTP httpClient
|
||||
httpClientTls httpTypes mtl network optparseApplicative vector
|
||||
];
|
||||
jailbreak = true;
|
||||
meta = {
|
||||
homepage = "http://github.com/elm-lang/elm-get";
|
||||
description = "Tool for sharing and using Elm libraries";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,23 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, ansiWlPprint, binary, blazeHtml, blazeMarkup, elmCompiler
|
||||
, elmPackage, filepath, mtl, optparseApplicative, text
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "elm-make";
|
||||
version = "0.1.1";
|
||||
sha256 = "02mqr6v146piwrhycnmlxnky5bmsl7ap7781qmcwkfmc89wfa4zl";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
ansiWlPprint binary blazeHtml blazeMarkup elmCompiler elmPackage
|
||||
filepath mtl optparseApplicative text
|
||||
];
|
||||
meta = {
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "A build tool for Elm projects";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,26 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, aeson, aesonPretty, ansiWlPprint, binary, elmCompiler
|
||||
, filepath, HTTP, httpClient, httpClientTls, httpTypes, mtl
|
||||
, network, optparseApplicative, text, time, unorderedContainers
|
||||
, vector, zipArchive
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "elm-package";
|
||||
version = "0.4";
|
||||
sha256 = "0vsq87imyvs1sa2n4z41b6qswy2cknxsg4prhwc9r7lvyljkmn03";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson aesonPretty ansiWlPprint binary elmCompiler filepath HTTP
|
||||
httpClient httpClientTls httpTypes mtl network optparseApplicative
|
||||
text time unorderedContainers vector zipArchive
|
||||
];
|
||||
meta = {
|
||||
homepage = "http://github.com/elm-lang/elm-package";
|
||||
description = "Package manager for Elm libraries";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"evancz/virtual-dom": "1.1.0",
|
||||
"evancz/elm-markdown": "1.1.2",
|
||||
"evancz/elm-html": "1.1.0",
|
||||
"elm-lang/core": "1.1.0"
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{ unzip, fetchurl, fetchFromGitHub, cabal, blazeHtml, blazeMarkup, cmdargs, elmCompiler, elmMake, filepath
|
||||
, fsnotify, HTTP, mtl, snapCore, snapServer, systemFilepath, text
|
||||
, time, transformers, unorderedContainers, websockets
|
||||
, websocketsSnap
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: rec {
|
||||
pname = "elm-reactor";
|
||||
version = "0.3";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildTools = [ unzip ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elm-lang";
|
||||
repo = "elm-reactor";
|
||||
rev = "176ff8e05e4bb7474752da1b3455c83d6181d594";
|
||||
sha256 = "1marjqlmmq3a74g9f3ngk90h9mkhillcdwfsys6x0nqj6qirw4ph";
|
||||
};
|
||||
elmLangCore = fetchurl {
|
||||
url = "https://github.com/elm-lang/core/archive/1.1.0.zip";
|
||||
sha256 = "1fhvghjsay1p82k13039wbd02k439yplv2rh9zr77zvcbih6a31j";
|
||||
};
|
||||
elmHtml = fetchurl {
|
||||
url = "https://github.com/evancz/elm-html/archive/1.1.0.zip";
|
||||
sha256 = "01wshabxsdrxcxs2nn3dhk7n8720sp3prpkahhx36vvprdh05l4q";
|
||||
};
|
||||
elmMarkdown = fetchurl {
|
||||
url = "https://github.com/evancz/elm-markdown/archive/1.1.2.zip";
|
||||
sha256 = "14y1wp28za50zypdzyvl5d57hkm0v3rgnzm5klv3jcbd625kr9bg";
|
||||
};
|
||||
virtualDom = fetchurl {
|
||||
url = "https://github.com/evancz/virtual-dom/archive/1.1.0.zip";
|
||||
sha256 = "08dr7q0x1ycgj5b15s2kn1a45iw350gzq65c3lxp47xfffq1vz91";
|
||||
};
|
||||
elmStuff = ./elm-reactor-exact-dependencies.json;
|
||||
|
||||
preConfigure = ''
|
||||
unzip -d $TEMPDIR -q ${elmLangCore}
|
||||
mkdir -p elm-stuff/packages/elm-lang/core/1.1.0
|
||||
cp -pr $TEMPDIR/core-1.1.0/* elm-stuff/packages/elm-lang/core/1.1.0/
|
||||
|
||||
unzip -d $TEMPDIR -q ${elmHtml}
|
||||
mkdir -p elm-stuff/packages/evancz/elm-html/1.1.0
|
||||
cp -pr $TEMPDIR/elm-html-1.1.0/* elm-stuff/packages/evancz/elm-html/1.1.0
|
||||
|
||||
unzip -d $TEMPDIR -q ${elmMarkdown}
|
||||
mkdir -p elm-stuff/packages/evancz/elm-markdown/1.1.2
|
||||
cp -pr $TEMPDIR/elm-markdown-1.1.2/* elm-stuff/packages/evancz/elm-markdown/1.1.2
|
||||
|
||||
unzip -d $TEMPDIR -q ${virtualDom}
|
||||
mkdir -p elm-stuff/packages/evancz/virtual-dom/1.1.0
|
||||
cp -pr $TEMPDIR/virtual-dom-1.1.0/* elm-stuff/packages/evancz/virtual-dom/1.1.0
|
||||
|
||||
cp ${elmStuff} elm-stuff/exact-dependencies.json
|
||||
'';
|
||||
buildDepends = [
|
||||
blazeHtml blazeMarkup cmdargs elmCompiler filepath fsnotify HTTP
|
||||
mtl snapCore snapServer systemFilepath text time transformers
|
||||
unorderedContainers websockets websocketsSnap elmMake
|
||||
];
|
||||
meta = {
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "Interactive development tool for Elm programs";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,28 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, bytestringTrie, cmdargs, Elm, filepath, haskeline, HUnit
|
||||
, mtl, parsec, QuickCheck, testFramework, testFrameworkHunit
|
||||
, testFrameworkQuickcheck2
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "elm-repl";
|
||||
version = "0.3";
|
||||
sha256 = "10a4a2ybg5dlshpklnisb957lknb0w8s3ppaq5p5y6ylqik8ak0a";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
bytestringTrie cmdargs Elm filepath haskeline mtl parsec
|
||||
];
|
||||
testDepends = [
|
||||
bytestringTrie cmdargs Elm filepath haskeline HUnit mtl parsec
|
||||
QuickCheck testFramework testFrameworkHunit
|
||||
testFrameworkQuickcheck2
|
||||
];
|
||||
meta = {
|
||||
homepage = "https://github.com/elm-lang/elm-repl";
|
||||
description = "a REPL for Elm";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,23 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, cmdargs, Elm, filepath, mtl, snapCore, snapServer
|
||||
, unorderedContainers
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "elm-server";
|
||||
version = "0.11.0.1";
|
||||
sha256 = "0nnkhmmm4cl6a314xxh5qwxkjsc3k3vcwdfar62578ykarxb53g1";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
cmdargs Elm filepath mtl snapCore snapServer unorderedContainers
|
||||
];
|
||||
jailbreak = true;
|
||||
meta = {
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "Server for developing Elm projects";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,40 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, aeson, aesonPretty, binary, blazeHtml, blazeMarkup
|
||||
, cheapskate, cmdargs, filemanip, filepath, highlightingKate, HUnit
|
||||
, indents, languageEcmascript, languageGlsl, mtl, parsec
|
||||
, QuickCheck, testFramework, testFrameworkHunit
|
||||
, testFrameworkQuickcheck2, text, transformers, unionFind
|
||||
, unorderedContainers
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "Elm";
|
||||
version = "0.13";
|
||||
sha256 = "1l6p00h0717blwvia0gvqpsakq8jy44fxc6brr4qxs5g4yjcjnmh";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson aesonPretty binary blazeHtml blazeMarkup cheapskate cmdargs
|
||||
filepath highlightingKate indents languageEcmascript languageGlsl
|
||||
mtl parsec text transformers unionFind unorderedContainers
|
||||
];
|
||||
testDepends = [
|
||||
aeson aesonPretty binary blazeHtml blazeMarkup cheapskate cmdargs
|
||||
filemanip filepath highlightingKate HUnit indents
|
||||
languageEcmascript languageGlsl mtl parsec QuickCheck testFramework
|
||||
testFrameworkHunit testFrameworkQuickcheck2 text transformers
|
||||
unionFind unorderedContainers
|
||||
];
|
||||
doCheck = false;
|
||||
preConfigure = ''
|
||||
rm -f Setup.hs
|
||||
echo -e "import Distribution.Simple\nmain=defaultMain\n" > Setup.hs
|
||||
'';
|
||||
meta = {
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "The Elm language module";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
26
pkgs/development/compilers/elm/elm2nix.rb
Executable file
26
pkgs/development/compilers/elm/elm2nix.rb
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'json'
|
||||
|
||||
system("elm-package install -y")
|
||||
depsSrc = JSON.parse(File.read("elm-stuff/exact-dependencies.json"))
|
||||
deps = Hash[ depsSrc.map { |pkg, ver|
|
||||
url = "https://github.com/#{pkg}/archive/#{ver}.tar.gz"
|
||||
sha256 = `nix-prefetch-url #{url}`
|
||||
|
||||
[ pkg, { version: ver,
|
||||
sha256: sha256.strip
|
||||
}
|
||||
]
|
||||
} ]
|
||||
|
||||
File.open("package.nix", 'w') do |file|
|
||||
file.puts "{"
|
||||
for pkg, info in deps
|
||||
file.puts " \"#{pkg}\" = {"
|
||||
file.puts " version = \"#{info[:version]}\";"
|
||||
file.puts " sha256 = \"#{info[:sha256]}\";"
|
||||
file.puts " };"
|
||||
end
|
||||
file.puts "}"
|
||||
end
|
||||
37
pkgs/development/compilers/elm/packages/elm-compiler.nix
Normal file
37
pkgs/development/compilers/elm/packages/elm-compiler.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ mkDerivation, aeson, aeson-pretty, ansi-terminal, base, binary
|
||||
, blaze-html, blaze-markup, bytestring, cmdargs, containers
|
||||
, directory, edit-distance, fetchgit, filemanip, filepath, HUnit
|
||||
, indents, language-ecmascript, language-glsl, mtl, parsec, pretty
|
||||
, process, QuickCheck, stdenv, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2, text, transformers, union-find
|
||||
, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-compiler";
|
||||
version = "0.15.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-compiler";
|
||||
sha256 = "379a38db4f240ab206a2bbedc49d4768d7cf6fdf497b2d25dea71fca1d58efaa";
|
||||
rev = "7fbdee067b494c0298d07c944629aaa5d3fa82f5";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson aeson-pretty ansi-terminal base binary blaze-html
|
||||
blaze-markup bytestring cmdargs containers directory edit-distance
|
||||
filepath indents language-ecmascript language-glsl mtl parsec
|
||||
pretty process text transformers union-find unordered-containers
|
||||
];
|
||||
testDepends = [
|
||||
aeson aeson-pretty ansi-terminal base binary blaze-html
|
||||
blaze-markup bytestring cmdargs containers directory edit-distance
|
||||
filemanip filepath HUnit indents language-ecmascript language-glsl
|
||||
mtl parsec pretty process QuickCheck test-framework
|
||||
test-framework-hunit test-framework-quickcheck2 text transformers
|
||||
union-find
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "Values to help with elm-package, elm-make, and elm-lang.org.";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
||||
25
pkgs/development/compilers/elm/packages/elm-make.nix
Normal file
25
pkgs/development/compilers/elm/packages/elm-make.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ mkDerivation, aeson, ansi-wl-pprint, base, binary, blaze-html
|
||||
, blaze-markup, bytestring, containers, directory, elm-compiler
|
||||
, elm-package, fetchgit, filepath, mtl, optparse-applicative
|
||||
, stdenv, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-make";
|
||||
version = "0.2";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-make";
|
||||
sha256 = "b618e827ca01ddeae38624f4bf5baa3dc4cb6e9e3c9bf15f2dda5a7c756bca33";
|
||||
rev = "d9bedfdadc9cefce8e5249db6a316a5e712158d0";
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson ansi-wl-pprint base binary blaze-html blaze-markup bytestring
|
||||
containers directory elm-compiler elm-package filepath mtl
|
||||
optparse-applicative text
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "A build tool for Elm projects";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
||||
27
pkgs/development/compilers/elm/packages/elm-package.nix
Normal file
27
pkgs/development/compilers/elm/packages/elm-package.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ mkDerivation, aeson, aeson-pretty, ansi-wl-pprint, base, binary
|
||||
, bytestring, containers, directory, elm-compiler, fetchgit
|
||||
, filepath, HTTP, http-client, http-client-tls, http-types, mtl
|
||||
, network, optparse-applicative, pretty, process, stdenv, text
|
||||
, time, unordered-containers, vector, zip-archive
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-package";
|
||||
version = "0.5.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-package";
|
||||
sha256 = "0d69e68831f4a86c6c02aed33fc3a6aca87636a7fb0bb6e39ffc74ddd15b5435";
|
||||
rev = "365e2d86a8222c92e50951c7d30b3c5db44c383d";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson aeson-pretty ansi-wl-pprint base binary bytestring containers
|
||||
directory elm-compiler filepath HTTP http-client http-client-tls
|
||||
http-types mtl network optparse-applicative pretty process text
|
||||
time unordered-containers vector zip-archive
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/elm-lang/elm-package";
|
||||
description = "Package manager for Elm libraries";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
||||
18
pkgs/development/compilers/elm/packages/elm-reactor-elm.nix
Normal file
18
pkgs/development/compilers/elm/packages/elm-reactor-elm.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"evancz/virtual-dom" = {
|
||||
version = "1.2.3";
|
||||
sha256 = "03iv9fpng3gvia00v3gl8rs83j5b112hx0vm36az13zjr378b1jr";
|
||||
};
|
||||
"evancz/elm-markdown" = {
|
||||
version = "1.1.5";
|
||||
sha256 = "01vdaz56i064lah7kd8485j0y33di8wa134sr4292wb3na990a8r";
|
||||
};
|
||||
"evancz/elm-html" = {
|
||||
version = "3.0.0";
|
||||
sha256 = "0a2iw45x3qwxkgibkc6qx1csfa06gpkfc9b04vkq1h7ynw2g5577";
|
||||
};
|
||||
"elm-lang/core" = {
|
||||
version = "2.1.0";
|
||||
sha256 = "10fg7bcc310b5bwv6sq7gjhy9r5xzc98nbk4zhs4jqykn36i6l43";
|
||||
};
|
||||
}
|
||||
27
pkgs/development/compilers/elm/packages/elm-reactor.nix
Normal file
27
pkgs/development/compilers/elm/packages/elm-reactor.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ mkDerivation, base, blaze-html, blaze-markup, bytestring, cmdargs
|
||||
, containers, directory, elm-compiler, fetchgit, filepath, fsnotify
|
||||
, HTTP, mtl, process, snap-core, snap-server, stdenv
|
||||
, system-filepath, text, time, transformers, unordered-containers
|
||||
, websockets, websockets-snap
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-reactor";
|
||||
version = "0.3.2";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-reactor";
|
||||
sha256 = "a7775971ea6634f13436f10098c462d39c6e115dbda79e537831a71975451e9a";
|
||||
rev = "b6c11be539734e72015ce151a9189d06dfc9db76";
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
base blaze-html blaze-markup bytestring cmdargs containers
|
||||
directory elm-compiler filepath fsnotify HTTP mtl process snap-core
|
||||
snap-server system-filepath text time transformers
|
||||
unordered-containers websockets websockets-snap
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "Interactive development tool for Elm programs";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
||||
30
pkgs/development/compilers/elm/packages/elm-repl.nix
Normal file
30
pkgs/development/compilers/elm/packages/elm-repl.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ mkDerivation, base, binary, bytestring, bytestring-trie, cmdargs
|
||||
, containers, directory, elm-compiler, elm-package, fetchgit
|
||||
, filepath, haskeline, HUnit, mtl, parsec, process, QuickCheck
|
||||
, stdenv, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-repl";
|
||||
version = "0.4.2";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-repl";
|
||||
sha256 = "a6eadbef7886c4c65243723f101910909bb0d53b2c48454ed7b39cf700f9649c";
|
||||
rev = "0c434fdb24b86a93b06c33c8f26857ce47caf165";
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
base binary bytestring bytestring-trie cmdargs containers directory
|
||||
elm-compiler elm-package filepath haskeline mtl parsec process
|
||||
];
|
||||
testDepends = [
|
||||
base bytestring bytestring-trie cmdargs directory elm-compiler
|
||||
elm-package filepath haskeline HUnit mtl parsec process QuickCheck
|
||||
test-framework test-framework-hunit test-framework-quickcheck2
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/elm-lang/elm-repl";
|
||||
description = "a REPL for Elm";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
||||
11
pkgs/development/compilers/elm/packages/release.nix
Normal file
11
pkgs/development/compilers/elm/packages/release.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ callPackage }:
|
||||
{
|
||||
version = "0.15.1";
|
||||
packages = {
|
||||
elm-compiler = callPackage ./elm-compiler.nix { };
|
||||
elm-package = callPackage ./elm-package.nix { };
|
||||
elm-make = callPackage ./elm-make.nix { };
|
||||
elm-reactor = callPackage ./elm-reactor.nix { };
|
||||
elm-repl = callPackage ./elm-repl.nix { };
|
||||
};
|
||||
}
|
||||
25
pkgs/development/compilers/elm/update-elm.rb
Executable file
25
pkgs/development/compilers/elm/update-elm.rb
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# Take those from https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs
|
||||
$elm_version = "0.15.1"
|
||||
$elm_packages = { "elm-compiler" => "0.15.1",
|
||||
"elm-package" => "0.5.1",
|
||||
"elm-make" => "0.2",
|
||||
"elm-reactor" => "0.3.2",
|
||||
"elm-repl" => "0.4.2"
|
||||
}
|
||||
|
||||
for pkg, ver in $elm_packages
|
||||
system "cabal2nix https://github.com/elm-lang/#{pkg} --revision refs/tags/#{ver} --jailbreak > #{pkg}.nix"
|
||||
end
|
||||
|
||||
File.open("release.nix", 'w') do |file|
|
||||
file.puts "{"
|
||||
file.puts " version = \"#{$elm_version}\";"
|
||||
file.puts " packages = {"
|
||||
for pkg, ver in $elm_packages
|
||||
file.puts " #{pkg} = callPackage ./#{pkg}.nix { };"
|
||||
end
|
||||
file.puts " };"
|
||||
file.puts "}"
|
||||
end
|
||||
@@ -35,6 +35,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://github.com/kripken/emscripten;
|
||||
description = "An LLVM-to-JavaScript Compiler";
|
||||
maintainers = with maintainers; [ bosu ];
|
||||
license = with licenses; ncsa;
|
||||
license = licenses.ncsa;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
||||
|
||||
{ cabal, boehmgc, Cabal, gmp, happy, mtl }:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "epic";
|
||||
version = "0.9.3.2";
|
||||
sha256 = "1l73absns4ci20brkdjg1r1l9p4xxx88vax736diqik7rl7zrx9h";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [ Cabal mtl ];
|
||||
buildTools = [ happy ];
|
||||
extraLibraries = [ boehmgc gmp ];
|
||||
meta = {
|
||||
homepage = "http://www.dcs.st-and.ac.uk/~eb/epic.php";
|
||||
description = "Compiler for a simple functional language";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
};
|
||||
})
|
||||
@@ -1,15 +1,17 @@
|
||||
{ stdenv, fetchurl, mono, pkgconfig, autoconf, automake, which }:
|
||||
# Temporaririly avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
|
||||
|
||||
{ stdenv, fetchurl, mono, pkgconfig, dotnetbuildhelpers, autoconf, automake, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fsharp-${version}";
|
||||
version = "3.1.1.31";
|
||||
version = "3.1.2.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz";
|
||||
sha256 = "1c38jpisnh8slqaaw1bsccxgllpc6yivrpb86raw4xalcbsc6fcv";
|
||||
sha256 = "1j6lnzvhj8fj1csb9am9xcrmmph6v3jyangkq8n1yp3dr6yxqzh1";
|
||||
};
|
||||
|
||||
buildInputs = [ mono pkgconfig autoconf automake which ];
|
||||
buildInputs = [ mono pkgconfig dotnetbuildhelpers autoconf automake which ];
|
||||
configurePhase = ''
|
||||
substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "/bin/sh"
|
||||
./autogen.sh --prefix $out
|
||||
@@ -23,6 +25,10 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace $out/bin/fsharpiAnyCpu --replace " mono " " ${mono}/bin/mono "
|
||||
ln -s $out/bin/fsharpc $out/bin/fsc
|
||||
ln -s $out/bin/fsharpi $out/bin/fsi
|
||||
for dll in "$out/lib/mono/4.5"/FSharp*.dll
|
||||
do
|
||||
create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll"
|
||||
done
|
||||
'';
|
||||
|
||||
# To fix this error when running:
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraCFlags="-isystem /usr/include"
|
||||
extraLDFlags="-L/usr/lib64 -L/usr/lib"
|
||||
export NIX_FIXINC_DUMMY=/usr/include
|
||||
fi
|
||||
|
||||
export NIX_EXTRA_CFLAGS=$extraCFlags
|
||||
for i in $extraLDFlags; do
|
||||
export NIX_EXTRA_LDFLAGS="$NIX_EXTRA_LDFLAGS -Wl,$i"
|
||||
done
|
||||
export CFLAGS=$extraCFlags
|
||||
export CXXFLAGS=$extraCFlags
|
||||
fi
|
||||
|
||||
|
||||
preConfigure() {
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
}
|
||||
|
||||
|
||||
if test -z "$profiledCompiler"; then
|
||||
buildFlags="bootstrap $buildFlags"
|
||||
else
|
||||
buildFlags="profiledbootstrap $buildFlags"
|
||||
fi
|
||||
|
||||
genericBuild
|
||||
@@ -1,47 +0,0 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langF77 ? false
|
||||
, profiledCompiler ? false
|
||||
}:
|
||||
|
||||
assert langC;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "gcc-3.4.6";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = mirror://gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2;
|
||||
md5 = "4a21ac777d4b5617283ce488b808da7b";
|
||||
};
|
||||
|
||||
patches = stdenv.lib.optional noSysDirs ./no-sys-dirs.patch;
|
||||
|
||||
# inspiration: https://aur.archlinux.org/packages/g77/
|
||||
postPatch = ''
|
||||
substituteInPlace gcc/config/i386/linux.h --replace 'struct siginfo' siginfo_t
|
||||
'';
|
||||
|
||||
inherit noSysDirs profiledCompiler;
|
||||
|
||||
configureFlags = "
|
||||
--disable-multilib
|
||||
--with-system-zlib
|
||||
--enable-languages=${
|
||||
concatStrings (intersperse ","
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langF77 "f77"
|
||||
)
|
||||
)
|
||||
}
|
||||
";
|
||||
|
||||
passthru = { inherit langC langCC langF77; isGNU = true; };
|
||||
|
||||
meta = {
|
||||
homepage = "http://gcc.gnu.org/";
|
||||
license = "GPL/LGPL";
|
||||
description = "GNU Compiler Collection, 3.4.x";
|
||||
};
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
diff -rc gcc-orig/gcc/cppdefault.c gcc-patched/gcc/cppdefault.c
|
||||
*** gcc-orig/gcc/cppdefault.c 2003-03-01 15:31:12.000000000 +0100
|
||||
--- gcc-patched/gcc/cppdefault.c 2004-06-29 10:08:45.000000000 +0200
|
||||
***************
|
||||
*** 41,46 ****
|
||||
--- 41,50 ----
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+ #undef LOCAL_INCLUDE_DIR
|
||||
+ #undef SYSTEM_INCLUDE_DIR
|
||||
+ #undef STANDARD_INCLUDE_DIR
|
||||
+
|
||||
const struct default_include cpp_include_defaults[]
|
||||
#ifdef INCLUDE_DEFAULTS
|
||||
= INCLUDE_DEFAULTS;
|
||||
diff -rc gcc-orig/gcc/Makefile.in gcc-patched/gcc/Makefile.in
|
||||
*** gcc-orig/gcc/Makefile.in 2004-04-01 18:47:54.000000000 +0200
|
||||
--- gcc-patched/gcc/Makefile.in 2004-06-29 13:50:45.000000000 +0200
|
||||
***************
|
||||
*** 199,205 ****
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
# These exists to be overridden by the x-* and t-* files, respectively.
|
||||
! X_CFLAGS =
|
||||
T_CFLAGS =
|
||||
|
||||
X_CPPFLAGS =
|
||||
--- 199,205 ----
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
# These exists to be overridden by the x-* and t-* files, respectively.
|
||||
! X_CFLAGS = $(NIX_EXTRA_CFLAGS) $(NIX_EXTRA_LDFLAGS)
|
||||
T_CFLAGS =
|
||||
|
||||
X_CPPFLAGS =
|
||||
***************
|
||||
*** 345,351 ****
|
||||
PARTITION_H = $(srcdir)/../include/partition.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
! NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
--- 345,355 ----
|
||||
PARTITION_H = $(srcdir)/../include/partition.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
! # Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
|
||||
! # `fixinc' from fixing header files in /usr/include. However,
|
||||
! # NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
|
||||
! # it to some dummy directory.
|
||||
! NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
diff -rc gcc-orig/libstdc++-v3/include/Makefile.in gcc-patched/libstdc++-v3/include/Makefile.in
|
||||
*** gcc-orig/libstdc++-v3/include/Makefile.in 2004-03-18 18:36:43.000000000 +0100
|
||||
--- gcc-patched/libstdc++-v3/include/Makefile.in 2004-06-29 19:01:33.000000000 +0200
|
||||
***************
|
||||
*** 896,903 ****
|
||||
if [ ! -d "${pch_output_builddir}" ]; then \
|
||||
mkdir -p ${pch_output_builddir}; \
|
||||
fi; \
|
||||
! $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
|
||||
! $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
|
||||
|
||||
# For robustness sake (in light of junk files or in-source
|
||||
# configuration), copy from the build or source tree to the install
|
||||
--- 896,903 ----
|
||||
if [ ! -d "${pch_output_builddir}" ]; then \
|
||||
mkdir -p ${pch_output_builddir}; \
|
||||
fi; \
|
||||
! $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
|
||||
! $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
|
||||
|
||||
# For robustness sake (in light of junk files or in-source
|
||||
# configuration), copy from the build or source tree to the install
|
||||
diff -rc gcc-orig/ltcf-cxx.sh gcc-patched/ltcf-cxx.sh
|
||||
*** gcc-orig/ltcf-cxx.sh 2003-11-19 06:29:32.000000000 +0100
|
||||
--- gcc-patched/ltcf-cxx.sh 2004-06-29 15:26:01.000000000 +0200
|
||||
***************
|
||||
*** 985,991 ****
|
||||
# the conftest object file.
|
||||
pre_test_object_deps_done=no
|
||||
|
||||
! for p in `eval $output_verbose_link_cmd`; do
|
||||
|
||||
case $p in
|
||||
|
||||
--- 985,991 ----
|
||||
# the conftest object file.
|
||||
pre_test_object_deps_done=no
|
||||
|
||||
! for p in `true`; do
|
||||
|
||||
case $p in
|
||||
|
||||
diff -rc gcc-orig/Makefile.in gcc-patched/Makefile.in
|
||||
*** gcc-orig/Makefile.in 2004-01-14 21:09:37.000000000 +0100
|
||||
--- gcc-patched/Makefile.in 2004-06-29 16:21:36.000000000 +0200
|
||||
***************
|
||||
*** 228,234 ****
|
||||
NM = @NM@
|
||||
|
||||
LD = @LD@
|
||||
! LDFLAGS =
|
||||
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
--- 228,234 ----
|
||||
NM = @NM@
|
||||
|
||||
LD = @LD@
|
||||
! LDFLAGS = $(NIX_EXTRA_LDFLAGS)
|
||||
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
***************
|
||||
*** 277,283 ****
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
|
||||
# If GCC_FOR_TARGET is not overriden on the command line, then this
|
||||
# variable is passed down to the gcc Makefile, where it is used to
|
||||
# build libgcc2.a. We define it here so that it can itself be
|
||||
--- 277,283 ----
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(NIX_EXTRA_CFLAGS)
|
||||
# If GCC_FOR_TARGET is not overriden on the command line, then this
|
||||
# variable is passed down to the gcc Makefile, where it is used to
|
||||
# build libgcc2.a. We define it here so that it can itself be
|
||||
***************
|
||||
*** 290,296 ****
|
||||
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
|
||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
--- 290,296 ----
|
||||
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
|
||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(NIX_EXTRA_CFLAGS)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
***************
|
||||
*** 321,327 ****
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
! LDFLAGS_FOR_TARGET =
|
||||
|
||||
NM_FOR_TARGET=@NM_FOR_TARGET@
|
||||
USUAL_NM_FOR_TARGET = ` \
|
||||
--- 321,327 ----
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
! LDFLAGS_FOR_TARGET = $(NIX_EXTRA_LDFLAGS)
|
||||
|
||||
NM_FOR_TARGET=@NM_FOR_TARGET@
|
||||
USUAL_NM_FOR_TARGET = ` \
|
||||
@@ -1,17 +0,0 @@
|
||||
The `jvgenmain' executable must be linked against `vec.o', among others,
|
||||
since it uses its vector API.
|
||||
|
||||
--- gcc-4.3.3/gcc/java/Make-lang.in 2008-12-05 00:00:19.000000000 +0100
|
||||
+++ gcc-4.3.3/gcc/java/Make-lang.in 2009-07-03 16:11:41.000000000 +0200
|
||||
@@ -109,9 +109,9 @@ jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIB
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
|
||||
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
|
||||
|
||||
-jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
|
||||
+jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) $(BUILD_RTL)
|
||||
rm -f $@
|
||||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
|
||||
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(BUILD_RTL) $(LIBS)
|
||||
|
||||
#
|
||||
# Build hooks:
|
||||
@@ -136,11 +136,11 @@ stdenv.mkDerivation ({
|
||||
|
||||
patches =
|
||||
[ ]
|
||||
++ optional (cross != null) ./libstdc++-target.patch
|
||||
++ optional (cross != null) ../libstdc++-target.patch
|
||||
++ optional noSysDirs ./no-sys-dirs.patch
|
||||
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||
# target libraries and tools.
|
||||
++ optional langAda ./gnat-cflags.patch
|
||||
++ optional langAda ../gnat-cflags.patch
|
||||
++ optional langVhdl ./ghdl-ortho-cflags.patch
|
||||
;
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
The `jvgenmain' executable must be linked against `vec.o', among others,
|
||||
since it uses its vector API.
|
||||
|
||||
--- gcc-4.3.3/gcc/java/Make-lang.in 2008-12-05 00:00:19.000000000 +0100
|
||||
+++ gcc-4.3.3/gcc/java/Make-lang.in 2009-07-03 16:11:41.000000000 +0200
|
||||
@@ -109,9 +109,9 @@ jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIB
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
|
||||
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
|
||||
|
||||
-jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
|
||||
+jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) $(BUILD_RTL)
|
||||
rm -f $@
|
||||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
|
||||
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(BUILD_RTL) $(LIBS)
|
||||
|
||||
#
|
||||
# Build hooks:
|
||||
@@ -52,13 +52,13 @@ let version = "4.6.4";
|
||||
crossGNU = cross != null && cross.config == "i586-pc-gnu";
|
||||
|
||||
patches = [ ]
|
||||
++ optional (cross != null) ./libstdc++-target.patch
|
||||
++ optional (cross != null) ../libstdc++-target.patch
|
||||
++ optional noSysDirs ./no-sys-dirs.patch
|
||||
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||
# target libraries and tools.
|
||||
++ optional langAda ./gnat-cflags.patch
|
||||
++ optional langAda ../gnat-cflags.patch
|
||||
++ optional langVhdl ./ghdl-ortho-cflags.patch
|
||||
++ optional langFortran ./gfortran-driving.patch
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ optional (stdenv.isGNU || crossGNU) ./hurd-sigrtmin.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
diff --git a/libada/Makefile.in b/libada/Makefile.in
|
||||
index f5057a0..337e0c6 100644
|
||||
--- a/libada/Makefile.in
|
||||
+++ b/libada/Makefile.in
|
||||
@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
|
||||
WARN_CFLAGS = @warn_cflags@
|
||||
|
||||
TARGET_LIBGCC2_CFLAGS=
|
||||
-GNATLIBCFLAGS= -g -O2
|
||||
+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
|
||||
GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
|
||||
-DIN_RTS @have_getipinfo@
|
||||
|
||||
--- a/gcc/ada/gcc-interface/Makefile.in
|
||||
+++ b/gcc/ada/gcc-interface/Makefile.in
|
||||
@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
|
||||
SOME_ADAFLAGS =-gnata
|
||||
FORCE_DEBUG_ADAFLAGS = -g
|
||||
GNATLIBFLAGS = -gnatpg -nostdinc
|
||||
-GNATLIBCFLAGS = -g -O2
|
||||
+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
|
||||
# Pretend that _Unwind_GetIPInfo is available for the target by default. This
|
||||
# should be autodetected during the configuration of libada and passed down to
|
||||
# here, but we need something for --disable-libada and hope for the best.
|
||||
@@ -193,7 +193,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
|
||||
# Link flags used to build gnat tools. By default we prefer to statically
|
||||
# link with libgcc to avoid a dependency on shared libgcc (which is tricky
|
||||
# to deal with as it may conflict with the libgcc provided by the system).
|
||||
-GCC_LINK_FLAGS=-static-libgcc
|
||||
+GCC_LINK_FLAGS=-static-libgcc $(CFLAGS_FOR_TARGET)
|
||||
|
||||
# End of variables for you to override.
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
The `jvgenmain' executable must be linked against `vec.o', among others,
|
||||
since it uses its vector API.
|
||||
|
||||
--- gcc-4.3.3/gcc/java/Make-lang.in 2008-12-05 00:00:19.000000000 +0100
|
||||
+++ gcc-4.3.3/gcc/java/Make-lang.in 2009-07-03 16:11:41.000000000 +0200
|
||||
@@ -109,9 +109,9 @@ jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIB
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
|
||||
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
|
||||
|
||||
-jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
|
||||
+jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) $(BUILD_RTL)
|
||||
rm -f $@
|
||||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
|
||||
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(BUILD_RTL) $(LIBS)
|
||||
|
||||
#
|
||||
# Build hooks:
|
||||
@@ -1,32 +0,0 @@
|
||||
Patch to make the target libraries 'configure' scripts find the proper CPP.
|
||||
I noticed that building the mingw32 cross compiler.
|
||||
Looking at the build script for mingw in archlinux, I think that only nixos
|
||||
needs this patch. I don't know why.
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 93f66b6..d691917 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -266,6 +266,7 @@ BASE_TARGET_EXPORTS = \
|
||||
AR="$(AR_FOR_TARGET)"; export AR; \
|
||||
AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
|
||||
CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
|
||||
+ CPP="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CC; \
|
||||
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
|
||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
|
||||
@@ -291,11 +292,13 @@ BASE_TARGET_EXPORTS = \
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
- CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
|
||||
+ CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
|
||||
+ CXXCPP="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
- CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
|
||||
+ CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
|
||||
+ CXXCPP="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
|
||||
|
||||
# Where to find GMP
|
||||
HOST_GMPLIBS = @gmplibs@
|
||||
@@ -56,7 +56,7 @@ assert langGo -> langCC;
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "4.8.4";
|
||||
let version = "4.8.5";
|
||||
|
||||
# Whether building a cross-compiler for GNU/Hurd.
|
||||
crossGNU = cross != null && cross.config == "i586-pc-gnu";
|
||||
@@ -64,13 +64,13 @@ let version = "4.8.4";
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = [ ]
|
||||
++ optional enableParallelBuilding ./parallel-bconfig.patch
|
||||
++ optional (cross != null) ./libstdc++-target.patch
|
||||
++ optional noSysDirs ./no-sys-dirs.patch
|
||||
++ optional enableParallelBuilding ../parallel-bconfig.patch
|
||||
++ optional (cross != null) ../libstdc++-target.patch
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
# 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 langAda ../gnat-cflags.patch
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
@@ -207,11 +207,13 @@ assert x11Support -> (filter (x: x == null) ([ gtk libart_lgpl ] ++ xlibs)) == [
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
|
||||
builder = ./builder.sh;
|
||||
builder = ../builder.sh;
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
sha256 = "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a";
|
||||
sha256 = "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2";
|
||||
};
|
||||
|
||||
inherit patches;
|
||||
@@ -516,7 +518,7 @@ stdenv.mkDerivation ({
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ viric shlevy simons ];
|
||||
maintainers = with stdenv.lib.maintainers; [ viric simons ];
|
||||
|
||||
# gnatboot is not available out of linux platforms, so we disable the darwin build
|
||||
# for the gnat (ada compiler).
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
This patch fixes interaction with Libtool.
|
||||
See <http://thread.gmane.org/gmane.comp.gcc.patches/258777>, for details.
|
||||
|
||||
--- a/gcc/fortran/gfortranspec.c
|
||||
+++ b/gcc/fortran/gfortranspec.c
|
||||
@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n"));
|
||||
{
|
||||
fprintf (stderr, _("Driving:"));
|
||||
for (i = 0; i < g77_newargc; i++)
|
||||
+ {
|
||||
+ if (g77_new_decoded_options[i].opt_index == OPT_l)
|
||||
+ /* Make sure no white space is inserted after `-l'. */
|
||||
+ fprintf (stderr, " -l%s",
|
||||
+ g77_new_decoded_options[i].canonical_option[1]);
|
||||
+ else
|
||||
fprintf (stderr, " %s",
|
||||
g77_new_decoded_options[i].orig_option_with_args_text);
|
||||
+ }
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
diff --git a/libada/Makefile.in b/libada/Makefile.in
|
||||
index f5057a0..337e0c6 100644
|
||||
--- a/libada/Makefile.in
|
||||
+++ b/libada/Makefile.in
|
||||
@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
|
||||
WARN_CFLAGS = @warn_cflags@
|
||||
|
||||
TARGET_LIBGCC2_CFLAGS=
|
||||
-GNATLIBCFLAGS= -g -O2
|
||||
+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
|
||||
GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
|
||||
-DIN_RTS @have_getipinfo@
|
||||
|
||||
--- a/gcc/ada/gcc-interface/Makefile.in
|
||||
+++ b/gcc/ada/gcc-interface/Makefile.in
|
||||
@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
|
||||
SOME_ADAFLAGS =-gnata
|
||||
FORCE_DEBUG_ADAFLAGS = -g
|
||||
GNATLIBFLAGS = -gnatpg -nostdinc
|
||||
-GNATLIBCFLAGS = -g -O2
|
||||
+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
|
||||
# Pretend that _Unwind_GetIPInfo is available for the target by default. This
|
||||
# should be autodetected during the configuration of libada and passed down to
|
||||
# here, but we need something for --disable-libada and hope for the best.
|
||||
@@ -193,7 +193,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
|
||||
# Link flags used to build gnat tools. By default we prefer to statically
|
||||
# link with libgcc to avoid a dependency on shared libgcc (which is tricky
|
||||
# to deal with as it may conflict with the libgcc provided by the system).
|
||||
-GCC_LINK_FLAGS=-static-libgcc
|
||||
+GCC_LINK_FLAGS=-static-libgcc $(CFLAGS_FOR_TARGET)
|
||||
|
||||
# End of variables for you to override.
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
The `jvgenmain' executable must be linked against `vec.o', among others,
|
||||
since it uses its vector API.
|
||||
|
||||
--- gcc-4.3.3/gcc/java/Make-lang.in 2008-12-05 00:00:19.000000000 +0100
|
||||
+++ gcc-4.3.3/gcc/java/Make-lang.in 2009-07-03 16:11:41.000000000 +0200
|
||||
@@ -109,9 +109,9 @@ jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIB
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
|
||||
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
|
||||
|
||||
-jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
|
||||
+jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) $(BUILD_RTL)
|
||||
rm -f $@
|
||||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
|
||||
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(BUILD_RTL) $(LIBS)
|
||||
|
||||
#
|
||||
# Build hooks:
|
||||
@@ -1,32 +0,0 @@
|
||||
Patch to make the target libraries 'configure' scripts find the proper CPP.
|
||||
I noticed that building the mingw32 cross compiler.
|
||||
Looking at the build script for mingw in archlinux, I think that only nixos
|
||||
needs this patch. I don't know why.
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 93f66b6..d691917 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -266,6 +266,7 @@ BASE_TARGET_EXPORTS = \
|
||||
AR="$(AR_FOR_TARGET)"; export AR; \
|
||||
AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
|
||||
CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
|
||||
+ CPP="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CC; \
|
||||
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
|
||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
|
||||
@@ -291,11 +292,13 @@ BASE_TARGET_EXPORTS = \
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
- CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
|
||||
+ CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
|
||||
+ CXXCPP="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
- CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
|
||||
+ CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
|
||||
+ CXXCPP="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
|
||||
|
||||
# Where to find GMP
|
||||
HOST_GMPLIBS = @gmplibs@
|
||||
@@ -1,245 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
if test "$staticCompiler" = "1"; then
|
||||
EXTRA_LDFLAGS="-static"
|
||||
else
|
||||
EXTRA_LDFLAGS=""
|
||||
fi
|
||||
|
||||
# GCC interprets empty paths as ".", which we don't want.
|
||||
if test -z "$CPATH"; then unset CPATH; fi
|
||||
if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi
|
||||
echo "\$CPATH is \`$CPATH'"
|
||||
echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraFlags="-isystem /usr/include"
|
||||
extraLDFlags="-L/usr/lib64 -L/usr/lib"
|
||||
glibc_libdir="/usr/lib"
|
||||
export NIX_FIXINC_DUMMY=/usr/include
|
||||
fi
|
||||
|
||||
extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
|
||||
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||
|
||||
# BOOT_CFLAGS defaults to `-g -O2'; since we override it below,
|
||||
# make sure to explictly add them so that files compiled with the
|
||||
# bootstrap compiler are optimized and (optionally) contain
|
||||
# debugging information (info "(gccinstall) Building").
|
||||
if test -n "$dontStrip"; then
|
||||
extraFlags="-O2 -g $extraFlags"
|
||||
else
|
||||
# Don't pass `-g' at all; this saves space while building.
|
||||
extraFlags="-O2 $extraFlags"
|
||||
fi
|
||||
|
||||
EXTRA_FLAGS="$extraFlags"
|
||||
for i in $extraLDFlags; do
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
|
||||
done
|
||||
|
||||
if test -n "$targetConfig"; then
|
||||
# Cross-compiling, we need gcc not to read ./specs in order to build
|
||||
# the g++ compiler (after the specs for the cross-gcc are created).
|
||||
# Having LIBRARY_PATH= makes gcc read the specs from ., and the build
|
||||
# breaks. Having this variable comes from the default.nix code to bring
|
||||
# gcj in.
|
||||
unset LIBRARY_PATH
|
||||
unset CPATH
|
||||
if test -z "$crossStageStatic"; then
|
||||
EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
|
||||
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
|
||||
fi
|
||||
else
|
||||
if test -z "$NIX_CC_CROSS"; then
|
||||
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
|
||||
else
|
||||
# This the case of cross-building the gcc.
|
||||
# We need special flags for the target, different than those of the build
|
||||
# Assertion:
|
||||
test -e $NIX_CC_CROSS/nix-support/orig-libc
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
|
||||
glibc_libdir="$glibc_dir/lib"
|
||||
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
|
||||
|
||||
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
|
||||
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||
|
||||
EXTRA_TARGET_CFLAGS="$extraFlags"
|
||||
for i in $extraLDFlags; do
|
||||
EXTRA_TARGET_LDFLAGS="$EXTRA_TARGET_LDFLAGS -Wl,$i"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
|
||||
# the startfiles.
|
||||
# FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
|
||||
# for the startfiles.
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
|
||||
CXXFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
|
||||
CFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
|
||||
CXXFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
|
||||
FLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
|
||||
LDFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
|
||||
LDFLAGS_FOR_TARGET="$EXTRA_TARGET_LDFLAGS $EXTRA_TARGET_LDFLAGS" \
|
||||
)
|
||||
|
||||
if test -z "$targetConfig"; then
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
|
||||
BOOT_LDFLAGS="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
|
||||
)
|
||||
fi
|
||||
|
||||
if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
|
||||
# We don't want the gcc build to assume there will be a libc providing
|
||||
# limits.h in this stagae
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
LIMITS_H_TEST=false \
|
||||
)
|
||||
else
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
LIMITS_H_TEST=true \
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$targetConfig"; then
|
||||
# The host strip will destroy some important details of the objects
|
||||
dontStrip=1
|
||||
fi
|
||||
|
||||
providedPreConfigure="$preConfigure";
|
||||
preConfigure() {
|
||||
if test -n "$newlibSrc"; then
|
||||
tar xvf "$newlibSrc" -C ..
|
||||
ln -s ../newlib-*/newlib newlib
|
||||
# Patch to get armvt5el working:
|
||||
sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
|
||||
fi
|
||||
# Bug - they packaged zlib
|
||||
if test -d "zlib"; then
|
||||
# This breaks the build without-headers, which should build only
|
||||
# the target libgcc as target libraries.
|
||||
# See 'configure:5370'
|
||||
rm -Rf zlib
|
||||
fi
|
||||
|
||||
if test -f "$NIX_CC/nix-support/orig-libc"; then
|
||||
# Patch the configure script so it finds glibc headers. It's
|
||||
# important for example in order not to get libssp built,
|
||||
# because its functionality is in glibc already.
|
||||
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
|
||||
sed -i \
|
||||
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
|
||||
gcc/configure
|
||||
fi
|
||||
|
||||
if test -n "$crossMingw" -a -n "$crossStageStatic"; then
|
||||
mkdir -p ../mingw
|
||||
# --with-build-sysroot expects that:
|
||||
cp -R $libcCross/include ../mingw
|
||||
configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
|
||||
fi
|
||||
|
||||
# Eval the preConfigure script from nix expression.
|
||||
eval $providedPreConfigure;
|
||||
env;
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
}
|
||||
|
||||
|
||||
postConfigure() {
|
||||
# Don't store the configure flags in the resulting executables.
|
||||
sed -e '/TOPLEVEL_CONFIGURE_ARGUMENTS=/d' -i Makefile
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
rm -rf $out/lib/gcc/*/*/install-tools
|
||||
|
||||
# More dependencies with the previous gcc or some libs (gccbug stores the build command line)
|
||||
rm -rf $out/bin/gccbug
|
||||
# Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
|
||||
for i in $out/libexec/gcc/*/*/*; do
|
||||
if PREV_RPATH=`patchelf --print-rpath $i`; then
|
||||
patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i
|
||||
fi
|
||||
done
|
||||
|
||||
# Get rid of some "fixed" header files
|
||||
rm -rf $out/lib/gcc/*/*/include/root
|
||||
|
||||
# Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
|
||||
for i in $out/bin/*-gcc*; do
|
||||
if cmp -s $out/bin/gcc $i; then
|
||||
ln -sfn gcc $i
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do
|
||||
if cmp -s $out/bin/g++ $i; then
|
||||
ln -sfn g++ $i
|
||||
fi
|
||||
done
|
||||
|
||||
eval "$postInstallGhdl"
|
||||
}
|
||||
|
||||
genericBuild
|
||||
@@ -1,5 +1,7 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.isDarwin
|
||||
, langObjCpp ? stdenv.isDarwin
|
||||
, langJava ? false
|
||||
, langAda ? false
|
||||
, langVhdl ? false
|
||||
@@ -13,10 +15,12 @@
|
||||
, libelf # optional, for link-time optimizations (LTO)
|
||||
, cloog ? null, isl ? null # optional, for the Graphite optimization framework.
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null
|
||||
, gtk ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
|
||||
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
|
||||
, x11Support ? langJava
|
||||
, gnatboot ? null
|
||||
, enableMultilib ? false
|
||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||
@@ -52,7 +56,7 @@ assert langGo -> langCC;
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "4.9.2";
|
||||
let version = "4.9.3";
|
||||
|
||||
# Whether building a cross-compiler for GNU/Hurd.
|
||||
crossGNU = cross != null && cross.config == "i586-pc-gnu";
|
||||
@@ -60,13 +64,13 @@ let version = "4.9.2";
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = [ ]
|
||||
++ optional enableParallelBuilding ./parallel-bconfig.patch
|
||||
++ optional (cross != null) ./libstdc++-target.patch
|
||||
# ++ optional noSysDirs ./no-sys-dirs.patch
|
||||
++ optionals enableParallelBuilding [ ../parallel-bconfig.patch ./parallel-strsignal.patch ]
|
||||
++ optional (cross != null) ../libstdc++-target.patch
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
# 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 langAda ../gnat-cflags.patch
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
@@ -80,8 +84,8 @@ let version = "4.9.2";
|
||||
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
|
||||
# binary distribution here to allow the whole chain to be bootstrapped.
|
||||
javaAntlr = fetchurl {
|
||||
url = http://www.antlr.org/download/antlr-3.1.3.jar;
|
||||
sha256 = "1f41j0y4kjydl71lqlvr73yagrs2jsg1fjymzjz66mjy7al5lh09";
|
||||
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
|
||||
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
|
||||
};
|
||||
|
||||
xlibs = [
|
||||
@@ -89,7 +93,7 @@ let version = "4.9.2";
|
||||
xproto renderproto xextproto inputproto randrproto
|
||||
];
|
||||
|
||||
javaAwtGtk = langJava && gtk != null;
|
||||
javaAwtGtk = langJava && x11Support;
|
||||
|
||||
/* Platform flags */
|
||||
platformFlags = let
|
||||
@@ -156,6 +160,7 @@ let version = "4.9.2";
|
||||
" --disable-libgomp " +
|
||||
" --disable-libquadmath" +
|
||||
" --disable-shared" +
|
||||
" --disable-libatomic " + # libatomic requires libc
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
(if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot"
|
||||
@@ -196,16 +201,18 @@ let version = "4.9.2";
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert gtk != null -> (filter (x: x == null) xlibs) == [];
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
|
||||
builder = ./builder.sh;
|
||||
builder = ../builder.sh;
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
sha256 = "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810";
|
||||
sha256 = "0zmnm00d2a1hsd41g34bhvxzvxisa2l584q3p447bd91lfjv4ci3";
|
||||
};
|
||||
|
||||
inherit patches;
|
||||
@@ -288,15 +295,21 @@ stdenv.mkDerivation ({
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = ''
|
||||
${stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit)
|
||||
''
|
||||
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
|
||||
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"
|
||||
''}
|
||||
'';
|
||||
preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) ''
|
||||
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
|
||||
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 stdenv.isDarwin ''
|
||||
if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then
|
||||
configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include)
|
||||
makeFlagsArray+=( \
|
||||
CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \
|
||||
CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \
|
||||
FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \
|
||||
)
|
||||
fi
|
||||
'';
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
@@ -307,7 +320,7 @@ stdenv.mkDerivation ({
|
||||
" --with-gnu-as --without-gnu-ld "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"}
|
||||
${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}"}
|
||||
@@ -338,6 +351,8 @@ stdenv.mkDerivation ({
|
||||
++ optional langAda "ada"
|
||||
++ optional langVhdl "vhdl"
|
||||
++ optional langGo "go"
|
||||
++ optional langObjC "objc"
|
||||
++ optional langObjCpp "obj-c++"
|
||||
++ optionals crossDarwin [ "objc" "obj-c++" ]
|
||||
)
|
||||
)
|
||||
@@ -475,9 +490,11 @@ stdenv.mkDerivation ({
|
||||
else null;
|
||||
|
||||
passthru =
|
||||
{ inherit langC langCC langAda langFortran langVhdl langGo enableMultilib version; isGNU = true; };
|
||||
{ inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
|
||||
|
||||
inherit enableParallelBuilding;
|
||||
inherit enableParallelBuilding enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
meta = {
|
||||
homepage = http://gcc.gnu.org/;
|
||||
@@ -494,7 +511,7 @@ stdenv.mkDerivation ({
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ viric shlevy simons ];
|
||||
maintainers = with stdenv.lib.maintainers; [ viric simons ];
|
||||
|
||||
# gnatboot is not available out of linux platforms, so we disable the darwin build
|
||||
# for the gnat (ada compiler).
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
This patch fixes interaction with Libtool.
|
||||
See <http://thread.gmane.org/gmane.comp.gcc.patches/258777>, for details.
|
||||
|
||||
--- a/gcc/fortran/gfortranspec.c
|
||||
+++ b/gcc/fortran/gfortranspec.c
|
||||
@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n"));
|
||||
{
|
||||
fprintf (stderr, _("Driving:"));
|
||||
for (i = 0; i < g77_newargc; i++)
|
||||
+ {
|
||||
+ if (g77_new_decoded_options[i].opt_index == OPT_l)
|
||||
+ /* Make sure no white space is inserted after `-l'. */
|
||||
+ fprintf (stderr, " -l%s",
|
||||
+ g77_new_decoded_options[i].canonical_option[1]);
|
||||
+ else
|
||||
fprintf (stderr, " %s",
|
||||
g77_new_decoded_options[i].orig_option_with_args_text);
|
||||
+ }
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
diff --git a/libada/Makefile.in b/libada/Makefile.in
|
||||
index f5057a0..337e0c6 100644
|
||||
--- a/libada/Makefile.in
|
||||
+++ b/libada/Makefile.in
|
||||
@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
|
||||
WARN_CFLAGS = @warn_cflags@
|
||||
|
||||
TARGET_LIBGCC2_CFLAGS=
|
||||
-GNATLIBCFLAGS= -g -O2
|
||||
+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
|
||||
GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
|
||||
-DIN_RTS @have_getipinfo@
|
||||
|
||||
--- a/gcc/ada/gcc-interface/Makefile.in
|
||||
+++ b/gcc/ada/gcc-interface/Makefile.in
|
||||
@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
|
||||
SOME_ADAFLAGS =-gnata
|
||||
FORCE_DEBUG_ADAFLAGS = -g
|
||||
GNATLIBFLAGS = -gnatpg -nostdinc
|
||||
-GNATLIBCFLAGS = -g -O2
|
||||
+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
|
||||
# Pretend that _Unwind_GetIPInfo is available for the target by default. This
|
||||
# should be autodetected during the configuration of libada and passed down to
|
||||
# here, but we need something for --disable-libada and hope for the best.
|
||||
@@ -193,7 +193,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
|
||||
# Link flags used to build gnat tools. By default we prefer to statically
|
||||
# link with libgcc to avoid a dependency on shared libgcc (which is tricky
|
||||
# to deal with as it may conflict with the libgcc provided by the system).
|
||||
-GCC_LINK_FLAGS=-static-libgcc
|
||||
+GCC_LINK_FLAGS=-static-libgcc $(CFLAGS_FOR_TARGET)
|
||||
|
||||
# End of variables for you to override.
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
The `jvgenmain' executable must be linked against `vec.o', among others,
|
||||
since it uses its vector API.
|
||||
|
||||
--- gcc-4.3.3/gcc/java/Make-lang.in 2008-12-05 00:00:19.000000000 +0100
|
||||
+++ gcc-4.3.3/gcc/java/Make-lang.in 2009-07-03 16:11:41.000000000 +0200
|
||||
@@ -109,9 +109,9 @@ jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIB
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
|
||||
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
|
||||
|
||||
-jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
|
||||
+jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) $(BUILD_RTL)
|
||||
rm -f $@
|
||||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
|
||||
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(BUILD_RTL) $(LIBS)
|
||||
|
||||
#
|
||||
# Build hooks:
|
||||
@@ -1,32 +0,0 @@
|
||||
Patch to make the target libraries 'configure' scripts find the proper CPP.
|
||||
I noticed that building the mingw32 cross compiler.
|
||||
Looking at the build script for mingw in archlinux, I think that only nixos
|
||||
needs this patch. I don't know why.
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 93f66b6..d691917 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -266,6 +266,7 @@ BASE_TARGET_EXPORTS = \
|
||||
AR="$(AR_FOR_TARGET)"; export AR; \
|
||||
AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
|
||||
CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
|
||||
+ CPP="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CC; \
|
||||
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
|
||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
|
||||
@@ -291,11 +292,13 @@ BASE_TARGET_EXPORTS = \
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
- CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
|
||||
+ CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
|
||||
+ CXXCPP="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
- CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
|
||||
+ CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
|
||||
+ CXXCPP="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
|
||||
|
||||
# Where to find GMP
|
||||
HOST_GMPLIBS = @gmplibs@
|
||||
@@ -1,41 +0,0 @@
|
||||
diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c
|
||||
--- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200
|
||||
@@ -41,6 +41,10 @@
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+#undef LOCAL_INCLUDE_DIR
|
||||
+#undef SYSTEM_INCLUDE_DIR
|
||||
+#undef STANDARD_INCLUDE_DIR
|
||||
+
|
||||
const struct default_include cpp_include_defaults[]
|
||||
#ifdef INCLUDE_DEFAULTS
|
||||
= INCLUDE_DEFAULTS;
|
||||
diff -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c
|
||||
--- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200
|
||||
@@ -1478,10 +1478,10 @@
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 ""
|
||||
#endif
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 ""
|
||||
#endif
|
||||
|
||||
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
|
||||
--- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200
|
||||
@@ -3277,7 +3281,7 @@
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
|
||||
+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
-DPREFIX=\"$(prefix)/\" \
|
||||
@@ -1,32 +0,0 @@
|
||||
Hacky work-around for highly parallel builds.
|
||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57125
|
||||
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index aad927c..182f666 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -3908,21 +3908,21 @@ build/gengtype-lex.o: $(BCONFIG_H)
|
||||
|
||||
gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \
|
||||
$(SYSTEM_H)
|
||||
-gengtype-parse.o: $(CONFIG_H)
|
||||
+gengtype-parse.o: $(CONFIG_H) $(BCONFIG_H)
|
||||
CFLAGS-gengtype-parse.o += -DGENERATOR_FILE
|
||||
build/gengtype-parse.o: $(BCONFIG_H)
|
||||
|
||||
gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
|
||||
gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
|
||||
$(XREGEX_H)
|
||||
-gengtype-state.o: $(CONFIG_H)
|
||||
+gengtype-state.o: $(CONFIG_H) $(BCONFIG_H)
|
||||
CFLAGS-gengtype-state.o += -DGENERATOR_FILE
|
||||
build/gengtype-state.o: $(BCONFIG_H)
|
||||
|
||||
gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \
|
||||
rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \
|
||||
$(OBSTACK_H) $(XREGEX_H)
|
||||
-gengtype.o: $(CONFIG_H)
|
||||
+gengtype.o: $(CONFIG_H) $(BCONFIG_H)
|
||||
CFLAGS-gengtype.o += -DGENERATOR_FILE
|
||||
build/gengtype.o: $(BCONFIG_H)
|
||||
|
||||
61
pkgs/development/compilers/gcc/4.9/parallel-strsignal.patch
Normal file
61
pkgs/development/compilers/gcc/4.9/parallel-strsignal.patch
Normal file
@@ -0,0 +1,61 @@
|
||||
gcc/Makefile.in: fix parallel building failure
|
||||
|
||||
The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included
|
||||
config.h which was a generated file. But no explicity rule
|
||||
to clarify the dependency. There was potential building
|
||||
failure while parallel make.
|
||||
|
||||
For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C
|
||||
source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the
|
||||
'$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these
|
||||
objects.
|
||||
|
||||
For errors.o, it is part of gengtype, and the gengtype generator program
|
||||
is special: Two versions are built. One is for the build machine, and one
|
||||
is for the host. We refered what gengtype-parse.o did (which also is part
|
||||
of gengtype).
|
||||
|
||||
[GCC #61899]
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899
|
||||
|
||||
Upstream-Status: Send to gcc-patches@gcc.gnu.org mailing list
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
gcc/Makefile.in | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index 6475cba..56e50bb 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
|
||||
opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
|
||||
hash-table.o file-find.o
|
||||
|
||||
+# Objects compiled from one C source file gcc-ar.c
|
||||
+OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o
|
||||
+
|
||||
# This lists all host objects for the front ends.
|
||||
ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
|
||||
|
||||
ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
|
||||
$(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
|
||||
$(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
|
||||
- lto-wrapper.o
|
||||
+ lto-wrapper.o $(OBJS-gcc-ar)
|
||||
|
||||
# This lists all host object files, whether they are included in this
|
||||
# compilation or not.
|
||||
@@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H)
|
||||
CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
|
||||
build/gengtype-parse.o: $(BCONFIG_H)
|
||||
|
||||
+errors.o : $(CONFIG_H)
|
||||
+
|
||||
gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
|
||||
gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
|
||||
$(XREGEX_H)
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
532
pkgs/development/compilers/gcc/5/default.nix
Normal file
532
pkgs/development/compilers/gcc/5/default.nix
Normal file
@@ -0,0 +1,532 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.isDarwin
|
||||
, langObjCpp ? stdenv.isDarwin
|
||||
, langJava ? false
|
||||
, langAda ? false
|
||||
, langVhdl ? false
|
||||
, langGo ? false
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
, libelf # optional, for link-time optimizations (LTO)
|
||||
, isl ? null # optional, for the Graphite optimization framework.
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null
|
||||
, gtk ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
|
||||
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
|
||||
, x11Support ? langJava
|
||||
, gnatboot ? null
|
||||
, enableMultilib ? false
|
||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, cross ? null
|
||||
, binutilsCross ? null
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, gnat ? null
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, gnused ? null
|
||||
, binutils ? null
|
||||
}:
|
||||
|
||||
assert langJava -> zip != null && unzip != null
|
||||
&& zlib != null && boehmgc != null
|
||||
&& perl != null; # for `--enable-java-home'
|
||||
assert langAda -> gnatboot != null;
|
||||
assert langVhdl -> gnat != null;
|
||||
|
||||
# LTO needs libelf and zlib.
|
||||
assert libelf != null -> zlib != null;
|
||||
|
||||
# Make sure we get GNU sed.
|
||||
assert stdenv.isDarwin -> gnused != null;
|
||||
|
||||
# Need c++filt on darwin
|
||||
assert stdenv.isDarwin -> binutils != null;
|
||||
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "5.2.0";
|
||||
|
||||
# Whether building a cross-compiler for GNU/Hurd.
|
||||
crossGNU = cross != null && cross.config == "i586-pc-gnu";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = [ ]
|
||||
++ optional (cross != null) ../libstdc++-target.patch
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
# 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;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
# `configure' time.
|
||||
|
||||
# XXX: Eventually we might want to take it from upstream.
|
||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||
};
|
||||
|
||||
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
|
||||
# binary distribution here to allow the whole chain to be bootstrapped.
|
||||
javaAntlr = fetchurl {
|
||||
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
|
||||
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
|
||||
};
|
||||
|
||||
xlibs = [
|
||||
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
|
||||
xproto renderproto xextproto inputproto randrproto
|
||||
];
|
||||
|
||||
javaAwtGtk = langJava && x11Support;
|
||||
|
||||
/* Platform flags */
|
||||
platformFlags = let
|
||||
gccArch = stdenv.platform.gcc.arch or null;
|
||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
||||
gccAbi = stdenv.platform.gcc.abi or null;
|
||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
||||
gccFloat = stdenv.platform.gcc.float or null;
|
||||
gccMode = stdenv.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;
|
||||
|
||||
/* Cross-gcc settings */
|
||||
crossMingw = cross != null && cross.libc == "msvcrt";
|
||||
crossDarwin = cross != null && cross.libc == "libSystem";
|
||||
crossConfigureFlags = let
|
||||
gccArch = stdenv.cross.gcc.arch or null;
|
||||
gccCpu = stdenv.cross.gcc.cpu or null;
|
||||
gccAbi = stdenv.cross.gcc.abi or null;
|
||||
gccFpu = stdenv.cross.gcc.fpu or null;
|
||||
gccFloat = stdenv.cross.gcc.float or null;
|
||||
gccMode = stdenv.cross.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
|
||||
"--target=${cross.config}" +
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
withFpu +
|
||||
withFloat +
|
||||
withMode +
|
||||
(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}/share/sysroot"
|
||||
else " --with-headers=${libcCross}/include") +
|
||||
# Ensure that -print-prog-name is able to find the correct programs.
|
||||
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
||||
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
||||
" --with-ld=${binutilsCross}/bin/${cross.config}-ld"
|
||||
)) +
|
||||
" --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 cross.libc == "uclibc" then
|
||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||
# and as I don't know how to pass it, I disable libgomp.
|
||||
" --disable-libgomp" else "") +
|
||||
" --enable-threads=posix" +
|
||||
" --enable-nls" +
|
||||
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
|
||||
);
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
|
||||
|
||||
bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips;
|
||||
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
sha256 = "1bccp8a106xwz3wkixn65ngxif112vn90qf95m6lzpgpnl25p0sz";
|
||||
};
|
||||
|
||||
inherit patches;
|
||||
|
||||
postPatch =
|
||||
if (stdenv.isGNU
|
||||
|| (libcCross != null # e.g., building `gcc.crossDrv'
|
||||
&& libcCross ? crossConfig
|
||||
&& libcCross.crossConfig == "i586-pc-gnu")
|
||||
|| (crossGNU && libcCross != null))
|
||||
then
|
||||
# On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not
|
||||
# in glibc, so add the right `-I' flags to the default spec string.
|
||||
assert libcCross != null -> libpthreadCross != null;
|
||||
let
|
||||
libc = if libcCross != null then libcCross else stdenv.glibc;
|
||||
gnu_h = "gcc/config/gnu.h";
|
||||
extraCPPDeps =
|
||||
libc.propagatedBuildInputs
|
||||
++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross
|
||||
++ stdenv.lib.optional (libpthread != null) libpthread;
|
||||
extraCPPSpec =
|
||||
concatStrings (intersperse " "
|
||||
(map (x: "-I${x}/include") extraCPPDeps));
|
||||
extraLibSpec =
|
||||
if libpthreadCross != null
|
||||
then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
|
||||
else "-L${libpthread}/lib";
|
||||
in
|
||||
'' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..."
|
||||
sed -i "${gnu_h}" \
|
||||
-es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
|
||||
|
||||
echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..."
|
||||
sed -i "${gnu_h}" \
|
||||
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
||||
|
||||
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
|
||||
sed -i "${gnu_h}" \
|
||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||
''
|
||||
else if cross != null || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
let
|
||||
libc = if libcCross != null then libcCross else stdenv.cc.libc;
|
||||
in
|
||||
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
|
||||
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
||||
do
|
||||
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
||||
echo " fixing \`$header'..."
|
||||
sed -i "$header" \
|
||||
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
|
||||
done
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
libcCross crossMingw;
|
||||
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
++ (optional javaAwtGtk pkgconfig);
|
||||
|
||||
buildInputs = [ gmp mpfr libmpc libelf ]
|
||||
++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (cross != null) [binutilsCross])
|
||||
++ (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 stdenv.isDarwin gnused)
|
||||
++ (optional stdenv.isDarwin binutils)
|
||||
;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) ''
|
||||
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
|
||||
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 stdenv.isDarwin ''
|
||||
if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then
|
||||
configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include)
|
||||
makeFlagsArray+=( \
|
||||
CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \
|
||||
CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \
|
||||
FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \
|
||||
)
|
||||
fi
|
||||
'';
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
configureFlags = "
|
||||
${if stdenv.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} " +
|
||||
|
||||
# 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}
|
||||
--with-mpfr=${mpfr}
|
||||
--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 (stdenv ? glibc && cross == null)
|
||||
then " --with-native-system-header-dir=${stdenv.glibc}/include"
|
||||
else ""}
|
||||
${if langAda then " --enable-libada" else ""}
|
||||
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
|
||||
${if cross != null then crossConfigureFlags else ""}
|
||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||
${if cross == null then platformFlags else ""}
|
||||
";
|
||||
|
||||
targetConfig = if cross != null then cross.config else null;
|
||||
|
||||
buildFlags = if bootstrap then
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
|
||||
else "";
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
crossAttrs = let
|
||||
xgccArch = stdenv.cross.gcc.arch or null;
|
||||
xgccCpu = stdenv.cross.gcc.cpu or null;
|
||||
xgccAbi = stdenv.cross.gcc.abi or null;
|
||||
xgccFpu = stdenv.cross.gcc.fpu or null;
|
||||
xgccFloat = stdenv.cross.gcc.float or null;
|
||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
||||
in {
|
||||
AR = "${stdenv.cross.config}-ar";
|
||||
LD = "${stdenv.cross.config}-ld";
|
||||
CC = "${stdenv.cross.config}-gcc";
|
||||
CXX = "${stdenv.cross.config}-gcc";
|
||||
AR_FOR_TARGET = "${stdenv.cross.config}-ar";
|
||||
LD_FOR_TARGET = "${stdenv.cross.config}-ld";
|
||||
CC_FOR_TARGET = "${stdenv.cross.config}-gcc";
|
||||
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
|
||||
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
|
||||
# If we are making a cross compiler, cross != null
|
||||
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
|
||||
dontStrip = true;
|
||||
configureFlags = ''
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||
--with-gmp=${gmp.crossDrv}
|
||||
--with-mpfr=${mpfr.crossDrv}
|
||||
--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 langGo "go"
|
||||
)
|
||||
)
|
||||
}
|
||||
${if langAda then " --enable-libada" else ""}
|
||||
--target=${stdenv.cross.config}
|
||||
${xwithArch}
|
||||
${xwithCpu}
|
||||
${xwithAbi}
|
||||
${xwithFpu}
|
||||
${xwithFloat}
|
||||
'';
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
|
||||
# Needed for the cross compilation to work
|
||||
AR = "ar";
|
||||
LD = "ld";
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
|
||||
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
|
||||
# the library headers and binaries, regarless of the language being
|
||||
# compiled.
|
||||
|
||||
# Note: When building the Java AWT GTK+ peer, the build system doesn't
|
||||
# honor `--with-gmp' et al., e.g., when building
|
||||
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
|
||||
# add them to $CPATH and $LIBRARY_PATH in this case.
|
||||
#
|
||||
# Likewise, the LTO code doesn't find zlib.
|
||||
|
||||
CPATH = concatStrings
|
||||
(intersperse ":" (map (x: x + "/include")
|
||||
(optionals (zlib != null) [ zlib ]
|
||||
++ optionals langJava [ boehmgc ]
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread
|
||||
++ optional (libpthreadCross != null) libpthreadCross
|
||||
|
||||
# On GNU/Hurd glibc refers to Mach & Hurd
|
||||
# headers.
|
||||
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
|
||||
libcCross.propagatedBuildInputs)));
|
||||
|
||||
LIBRARY_PATH = concatStrings
|
||||
(intersperse ":" (map (x: x + "/lib")
|
||||
(optionals (zlib != null) [ zlib ]
|
||||
++ optionals langJava [ boehmgc ]
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread)));
|
||||
|
||||
EXTRA_TARGET_CFLAGS =
|
||||
if cross != null && libcCross != null
|
||||
then "-idirafter ${libcCross}/include"
|
||||
else null;
|
||||
|
||||
EXTRA_TARGET_LDFLAGS =
|
||||
if cross != null && libcCross != null
|
||||
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
|
||||
(optionalString (libpthreadCross != null)
|
||||
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
|
||||
else null;
|
||||
|
||||
passthru =
|
||||
{ inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
|
||||
|
||||
inherit enableParallelBuilding enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
meta = {
|
||||
homepage = http://gcc.gnu.org/;
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
longDescription = ''
|
||||
The GNU Compiler Collection includes compiler front ends for C, C++,
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
|
||||
as libraries for these languages (libstdc++, libgcj, libgomp,...).
|
||||
|
||||
GCC development is a part of the GNU Project, aiming to improve the
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ viric simons ];
|
||||
|
||||
# gnatboot is not available out of linux platforms, so we disable the darwin build
|
||||
# for the gnat (ada compiler).
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
optionals (langAda == false) stdenv.lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
// optionalAttrs (cross != null && cross.libc == "msvcrt" && crossStageStatic) {
|
||||
makeFlags = [ "all-gcc" "all-target-libgcc" ];
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence cross != null)
|
||||
// optionalAttrs (!stripped || cross != null) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
)
|
||||
27
pkgs/development/compilers/gcc/gfortran-darwin.nix
Normal file
27
pkgs/development/compilers/gcc/gfortran-darwin.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
# This is a derivation specific to OS X (Darwin). It may work on other
|
||||
# systems as well but has not been tested.
|
||||
{gmp, mpfr, libmpc, fetchurl, stdenv}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gfortran-${version}";
|
||||
version = "5.1.0";
|
||||
buildInputs = [gmp mpfr libmpc];
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
sha256 = "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp";
|
||||
};
|
||||
configureFlags = ''
|
||||
--enable-languages=fortran --enable-checking=release --disable-bootstrap
|
||||
--with-gmp=${gmp}
|
||||
--with-mpfr=${mpfr}
|
||||
--with-mpc=${libmpc}
|
||||
'';
|
||||
makeFlags = ["CC=clang"];
|
||||
passthru.cc = stdenv.cc.cc;
|
||||
meta = with stdenv.lib; {
|
||||
description = "GNU Fortran compiler, part of the GNU Compiler Collection.";
|
||||
homepage = "https://gcc.gnu.org/fortran/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,16 +1,18 @@
|
||||
a :
|
||||
let
|
||||
a @ { mpfr, m4, binutils, fetchcvs, emacs, zlib, which
|
||||
, texinfo, libX11, xproto, inputproto, libXi
|
||||
, libXext, xextproto, libXt, libXaw, libXmu, stdenv, ... } :
|
||||
let
|
||||
buildInputs = with a; [
|
||||
mpfr m4 binutils emacs gmp
|
||||
libX11 xproto inputproto libXi
|
||||
libX11 xproto inputproto libXi
|
||||
libXext xextproto libXt libXaw libXmu
|
||||
zlib which texinfo texLive
|
||||
];
|
||||
zlib which texinfo
|
||||
];
|
||||
in
|
||||
|
||||
(
|
||||
assert a.stdenv ? cc ;
|
||||
assert a.stdenv.cc.cc.isGNU or false ;
|
||||
assert a.stdenv.cc.isGNU ;
|
||||
assert a.stdenv.cc ? libc ;
|
||||
assert a.stdenv.cc.libc != null ;
|
||||
|
||||
@@ -40,7 +42,7 @@ rec {
|
||||
'') ["minInit" "doUnpack" "addInputs"];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["setVars" "doUnpack" "preBuild"
|
||||
phaseNames = ["setVars" "doUnpack" "preBuild"
|
||||
"doConfigure" "doMakeInstall"];
|
||||
}) // {
|
||||
meta = {
|
||||
@@ -48,7 +50,7 @@ rec {
|
||||
maintainers = [
|
||||
a.lib.maintainers.raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
platforms = with a.lib.platforms;
|
||||
linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
find . -type f -perm +100 \
|
||||
find . -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
@@ -97,6 +97,11 @@ stdenv.mkDerivation rec {
|
||||
[ $(./main) == "yes" ]
|
||||
'';
|
||||
|
||||
meta.license = stdenv.lib.licenses.bsd3;
|
||||
meta.platforms = ["x86_64-linux" "i686-linux"];
|
||||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = ["x86_64-linux" "i686-linux"];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
find . -type f -perm +100 \
|
||||
find . -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
@@ -90,7 +90,7 @@ stdenv.mkDerivation rec {
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out \
|
||||
--with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include \
|
||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${../../haskell-modules/gcc-clang-wrapper.sh}"}
|
||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
|
||||
'';
|
||||
|
||||
# Stripping combined with patchelf breaks the executables (they die
|
||||
|
||||
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'';
|
||||
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${../../haskell-modules/gcc-clang-wrapper.sh}"
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
else "--with-gcc=${stdenv.cc}/bin/gcc";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv }:
|
||||
|
||||
let
|
||||
|
||||
buildMK = ''
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
|
||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||
''}
|
||||
'';
|
||||
|
||||
# We patch Cabal for GHCJS. See: https://github.com/haskell/cabal/issues/2454
|
||||
# This should be removed when GHC includes Cabal > 1.22.2.0
|
||||
cabalPatch = fetchpatch {
|
||||
url = https://github.com/haskell/cabal/commit/f11b7c858bb25be78b81413c69648c87c446859e.patch;
|
||||
sha256 = "1z56yyc7lgc78g847qf19f5n1yk054pzlnc2i178dpsj0mgjppyb";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.10.1";
|
||||
name = "ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.haskell.org/~ghc/7.10.1/${name}-src.tar.xz";
|
||||
sha256 = "181srnj3s5dcqb096yminjg50lq9cx57075n95y5hz33gbbf7wwj";
|
||||
};
|
||||
|
||||
buildInputs = [ ghc perl ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
pushd libraries/Cabal
|
||||
patch -p1 < ${cabalPatch}
|
||||
popd
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
echo >mk/build.mk "${buildMK}"
|
||||
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}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||
|
||||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ];
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
}
|
||||
70
pkgs/development/compilers/ghc/7.10.2.nix
Normal file
70
pkgs/development/compilers/ghc/7.10.2.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
|
||||
, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
buildMK = ''
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
|
||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||
''}
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.10.2";
|
||||
name = "ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.haskell.org/~ghc/7.10.2/${name}-src.tar.xz";
|
||||
sha256 = "1x8m4rp2v7ydnrz6z9g8x7z3x3d3pxhv2pixy7i7hkbqbdsp7kal";
|
||||
};
|
||||
|
||||
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
echo >mk/build.mk "${buildMK}"
|
||||
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}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/ghc
|
||||
|
||||
# Patch scripts to include "readelf" and "cat" in $PATH.
|
||||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${binutils}/bin:${coreutils}/bin"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ];
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'';
|
||||
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${../../haskell-modules/gcc-clang-wrapper.sh}"
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
else "--with-gcc=${stdenv.cc}/bin/gcc";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
||||
|
||||
@@ -60,9 +60,11 @@ stdenv.mkDerivation rec {
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
find . -type f -perm +100 \
|
||||
mkdir -p "$out/lib"
|
||||
ln -sv "${ncurses}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5"
|
||||
find . -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
|
||||
--set-rpath "$out/lib:${gmp}/lib" {} \;
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
@@ -90,7 +92,7 @@ stdenv.mkDerivation rec {
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out \
|
||||
--with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include \
|
||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${../../haskell-modules/gcc-clang-wrapper.sh}"}
|
||||
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
|
||||
'';
|
||||
|
||||
# Stripping combined with patchelf breaks the executables (they die
|
||||
|
||||
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'';
|
||||
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${../../haskell-modules/gcc-clang-wrapper.sh}"
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
else "--with-gcc=${stdenv.cc}/bin/gcc";
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -52,7 +52,7 @@ in stdenv.mkDerivation rec {
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'';
|
||||
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${../../haskell-modules/gcc-clang-wrapper.sh}"
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
else "--with-gcc=${stdenv.cc}/bin/gcc";
|
||||
|
||||
postInstall = ''
|
||||
|
||||
48
pkgs/development/compilers/ghc/7.8.3.nix
Normal file
48
pkgs/development/compilers/ghc/7.8.3.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.8.3";
|
||||
name = "ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.haskell.org/ghc/dist/${version}/${name}-src.tar.xz";
|
||||
sha256 = "0n5rhwl83yv8qm0zrbaxnyrf8x1i3b6si927518mwfxs96jrdkdh";
|
||||
};
|
||||
|
||||
buildInputs = [ ghc perl gmp ncurses ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildMK = ''
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
|
||||
DYNAMIC_BY_DEFAULT = NO
|
||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||
''}
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
echo "${buildMK}" > mk/build.mk
|
||||
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}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'';
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||
|
||||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ];
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (rec {
|
||||
version = "7.8.4";
|
||||
name = "ghc-${version}";
|
||||
|
||||
@@ -45,4 +45,7 @@ stdenv.mkDerivation rec {
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
}
|
||||
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
|
||||
# https://ghc.haskell.org/trac/ghc/ticket/9762
|
||||
patches = [ ./hpc-7.8.4.patch ];
|
||||
})
|
||||
|
||||
@@ -17,18 +17,20 @@ let
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.11.20150402";
|
||||
version = "7.11.20150828";
|
||||
name = "ghc-${version}";
|
||||
rev = "47f821a1a24553dc29b9581b1a259a9b1394c955";
|
||||
rev = "38c98e4f61a48084995a5347d76ddd024ce1a09c";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.haskell.org/ghc.git";
|
||||
inherit rev;
|
||||
sha256 = "111a2z6bgn966g04a9n2ns9n2a401rd0zqgndznn2w4fv8a4qzgj";
|
||||
sha256 = "0wnxrfzjpjcmsmd2i0zg30jg7zpw1rrfwz8r56g314l7xcns6yp1";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
pushd ghc-${builtins.substring 0 7 rev}
|
||||
echo ${version} >VERSION
|
||||
echo ${rev} >GIT_COMMIT_ID
|
||||
patchShebangs .
|
||||
./boot
|
||||
popd
|
||||
|
||||
13
pkgs/development/compilers/ghc/hpc-7.8.4.patch
Normal file
13
pkgs/development/compilers/ghc/hpc-7.8.4.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
|
||||
index 991fc57..0aad221 100644
|
||||
--- a/compiler/cmm/CLabel.hs
|
||||
+++ b/compiler/cmm/CLabel.hs
|
||||
@@ -877,7 +877,7 @@ labelDynamic dflags this_pkg this_mod lbl =
|
||||
|
||||
PlainModuleInitLabel m -> not (gopt Opt_Static dflags) && this_pkg /= (modulePackageId m)
|
||||
|
||||
- HpcTicksLabel m -> not (gopt Opt_Static dflags) && this_pkg /= (modulePackageId m)
|
||||
+ HpcTicksLabel m -> not (gopt Opt_Static dflags) && this_mod /= m
|
||||
|
||||
-- Note that DynamicLinkerLabels do NOT require dynamic linking themselves.
|
||||
_ -> False
|
||||
76
pkgs/development/compilers/ghc/nokinds.nix
Normal file
76
pkgs/development/compilers/ghc/nokinds.nix
Normal file
@@ -0,0 +1,76 @@
|
||||
{ stdenv, fetchgit, ghc, perl, gmp, ncurses, libiconv, autoconf, automake, happy, alex }:
|
||||
|
||||
let
|
||||
|
||||
buildMK = ''
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
|
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
|
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
|
||||
DYNAMIC_BY_DEFAULT = NO
|
||||
SRC_HC_OPTS = -H64m -O -fasm
|
||||
GhcLibHcOpts = -O -dcore-lint
|
||||
GhcStage1HcOpts = -Rghc-timing -O -fasm
|
||||
GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
|
||||
SplitObjs = NO
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_DOCBOOK_HTML = NO
|
||||
BUILD_DOCBOOK_PS = NO
|
||||
BUILD_DOCBOOK_PDF = NO
|
||||
LAX_DEPENDENCIES = YES
|
||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||
''}
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.11.20150826";
|
||||
name = "ghc-${version}"; # We cannot add a "nokinds" tag here; see git comment for details.
|
||||
rev = "5f7f64b7fc879b5ecfd6987ec5565bd90f7c0179";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/goldfirere/ghc.git";
|
||||
inherit rev;
|
||||
sha256 = "183l4v6aw52r3ydwl8bxg1lh3cwfakb35rpy6mjg23dqmqsynmcn";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
pushd ghc-${builtins.substring 0 7 rev}
|
||||
echo ${version} >VERSION
|
||||
echo ${rev} >GIT_COMMIT_ID
|
||||
patchShebangs .
|
||||
./boot
|
||||
popd
|
||||
'';
|
||||
|
||||
buildInputs = [ ghc perl autoconf automake happy alex ];
|
||||
|
||||
preConfigure = ''
|
||||
echo >mk/build.mk "${buildMK}"
|
||||
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}"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||
|
||||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The dependently-typed 'nokinds' branch of the Glasgow Haskell Compiler by Richard Eisenberg";
|
||||
maintainers = with stdenv.lib.maintainers; [ deepfire ];
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
}
|
||||
60
pkgs/development/compilers/ghc/osx-dylib-resolver.patch
Normal file
60
pkgs/development/compilers/ghc/osx-dylib-resolver.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
|
||||
--- a/compiler/ghci/Linker.hs
|
||||
+++ b/compiler/ghci/Linker.hs
|
||||
@@ -119,9 +119,9 @@
|
||||
-- that is really important
|
||||
pkgs_loaded :: ![PackageKey],
|
||||
|
||||
- -- we need to remember the name of the last temporary DLL/.so
|
||||
- -- so we can link it
|
||||
- last_temp_so :: !(Maybe (FilePath, String)) }
|
||||
+ -- we need to remember the name of previous temporary DLL/.so
|
||||
+ -- libraries so we can link them (see #10322)
|
||||
+ temp_sos :: ![(FilePath, String)] }
|
||||
|
||||
|
||||
emptyPLS :: DynFlags -> PersistentLinkerState
|
||||
@@ -131,7 +131,7 @@
|
||||
pkgs_loaded = init_pkgs,
|
||||
bcos_loaded = [],
|
||||
objs_loaded = [],
|
||||
- last_temp_so = Nothing }
|
||||
+ temp_sos = [] }
|
||||
|
||||
-- Packages that don't need loading, because the compiler
|
||||
-- shares them with the interpreted program.
|
||||
@@ -841,19 +841,19 @@
|
||||
dflags2 = dflags1 {
|
||||
-- We don't want the original ldInputs in
|
||||
-- (they're already linked in), but we do want
|
||||
- -- to link against the previous dynLoadObjs
|
||||
- -- library if there was one, so that the linker
|
||||
+ -- to link against previous dynLoadObjs
|
||||
+ -- libraries if there were any, so that the linker
|
||||
-- can resolve dependencies when it loads this
|
||||
-- library.
|
||||
ldInputs =
|
||||
- case last_temp_so pls of
|
||||
- Nothing -> []
|
||||
- Just (lp, l) ->
|
||||
+ concatMap
|
||||
+ (\(lp, l) ->
|
||||
[ Option ("-L" ++ lp)
|
||||
, Option ("-Wl,-rpath")
|
||||
, Option ("-Wl," ++ lp)
|
||||
, Option ("-l" ++ l)
|
||||
- ],
|
||||
+ ])
|
||||
+ (temp_sos pls),
|
||||
-- Even if we're e.g. profiling, we still want
|
||||
-- the vanilla dynamic libraries, so we set the
|
||||
-- ways / build tag to be just WayDyn.
|
||||
@@ -868,7 +868,7 @@
|
||||
consIORef (filesToNotIntermediateClean dflags) soFile
|
||||
m <- loadDLL soFile
|
||||
case m of
|
||||
- Nothing -> return pls { last_temp_so = Just (libPath, libName) }
|
||||
+ Nothing -> return pls { temp_sos = (libPath, libName) : temp_sos pls }
|
||||
Just err -> panic ("Loading temp shared object failed: " ++ err)
|
||||
|
||||
rmDupLinkables :: [Linkable] -- Already loaded
|
||||
@@ -1,86 +0,0 @@
|
||||
{ stdenv, ghc, makeWrapper, coreutils, writeScript }:
|
||||
|
||||
let
|
||||
ghc761OrLater = !stdenv.lib.versionOlder ghc.version "7.6.1";
|
||||
packageDBFlag = if ghc761OrLater then "-package-db" else "-package-conf";
|
||||
|
||||
GHCGetPackages = writeScript "ghc-get-packages.sh" ''
|
||||
#! ${stdenv.shell}
|
||||
# Usage:
|
||||
# $1: version of GHC
|
||||
# $2: invocation path of GHC
|
||||
# $3: prefix
|
||||
version="$1"
|
||||
if test -z "$3"; then
|
||||
prefix="${packageDBFlag} "
|
||||
else
|
||||
prefix="$3"
|
||||
fi
|
||||
PATH="$2:$PATH"
|
||||
IFS=":"
|
||||
for p in $PATH; do
|
||||
PkgDir="$p/../lib/ghc-$version/package.conf.d"
|
||||
for i in "$PkgDir/"*.installedconf; do
|
||||
# output takes place here
|
||||
test -f $i && echo -n " $prefix$i"
|
||||
done
|
||||
done
|
||||
test -f "$2/../lib/ghc-$version/package.conf" && echo -n " $prefix$2/../lib/ghc-$version/package.conf"
|
||||
'';
|
||||
|
||||
GHCPackages = writeScript "ghc-packages.sh" ''
|
||||
#! ${stdenv.shell} -e
|
||||
declare -A GHC_PACKAGES_HASH # using bash4 hashs to get uniq paths
|
||||
|
||||
for arg in $(${GHCGetPackages} ${ghc.version} "$(dirname $0)"); do
|
||||
case "$arg" in
|
||||
${packageDBFlag}) ;;
|
||||
*)
|
||||
CANONICALIZED="$(${coreutils}/bin/readlink -f -- "$arg")"
|
||||
GHC_PACKAGES_HASH["$CANONICALIZED"]= ;;
|
||||
esac
|
||||
done
|
||||
|
||||
for path in ''${!GHC_PACKAGES_HASH[@]}; do
|
||||
echo -n "$path:"
|
||||
done
|
||||
'';
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "ghc-${ghc.version}-wrapper";
|
||||
|
||||
buildInputs = [makeWrapper];
|
||||
propagatedBuildInputs = [ghc];
|
||||
|
||||
unpackPhase = "true";
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
|
||||
makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghc.version} \"\$(dirname \$0)\")"
|
||||
done
|
||||
for prg in runghc runhaskell; do
|
||||
makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghc.version} \"\$(dirname \$0)\" \" ${packageDBFlag} --ghc-arg=\")"
|
||||
done
|
||||
for prg in ghc-pkg ghc-pkg-${ghc.version}; do
|
||||
makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghc.version} \"\$(dirname \$0)\" -${packageDBFlag}=)"
|
||||
done
|
||||
for prg in hp2ps hpc hasktags hsc2hs; do
|
||||
test -x $ghc/bin/$prg && ln -s $ghc/bin/$prg $out/bin/$prg
|
||||
done
|
||||
|
||||
mkdir -p $out/nix-support
|
||||
ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
|
||||
|
||||
mkdir -p $out/share/doc
|
||||
ln -s $ghc/lib $out/lib
|
||||
ln -s $ghc/share/doc/ghc $out/share/doc/ghc-${ghc.version}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
inherit ghc GHCGetPackages GHCPackages;
|
||||
inherit (ghc) meta version;
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
, lens
|
||||
, parallel, safe, shelly, split, stringsearch, syb
|
||||
, tar, terminfo
|
||||
, vector, yaml, fetchgit, Cabal
|
||||
, vector, yaml, fetchgit, fetchFromGitHub, Cabal
|
||||
, alex, happy, git, gnumake, autoconf, patch
|
||||
, automake, libtool
|
||||
, cryptohash
|
||||
@@ -39,28 +39,28 @@
|
||||
}:
|
||||
let
|
||||
version = "0.1.0";
|
||||
ghcArch = if pkgs.stdenv.system == "i686-linux"
|
||||
then "i386-linux"
|
||||
else pkgs.stdenv.system;
|
||||
libDir = "share/ghcjs/${ghcArch}-${version}-${ghc.version}/ghcjs";
|
||||
ghcjsBoot = fetchgit {
|
||||
url = git://github.com/ghcjs/ghcjs-boot.git;
|
||||
rev = "ab8765edcb507b8b810e3c324fd5bd5af2b69d8f"; # 7.10 branch
|
||||
sha256 = "63b69a1d131cf3c7088e0f28d14750c81361dcc276fa113ad80dcccf73df5343";
|
||||
url = "git://github.com/ghcjs/ghcjs-boot.git";
|
||||
rev = "ec9f795b42b40fd24933d1672db153df5a29cc00"; # master branch
|
||||
sha256 = "0bkvqlsgb9n0faayi4k1dlkn9cbm99a66m9nnx1kykb44qcl40yg";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
shims = fetchgit {
|
||||
url = git://github.com/ghcjs/shims.git;
|
||||
rev = "6ada4bf1a084d1b80b993303d35ed863d219b031"; # master branch
|
||||
sha256 = "0dhfnjj3rxdbb2m1pbnjc2yp4xcgsfdrsinljgdmg0hpqkafp4vc";
|
||||
shims = fetchFromGitHub {
|
||||
owner = "ghcjs";
|
||||
repo = "shims";
|
||||
rev = "01e01dee31a4786b3d01092e72350b0859a9f8c9"; # master branch
|
||||
sha256 = "01m1yhq6l71azx0zqbpzmqc6rxxf654hgjibc0lz2cg5942wh1hf";
|
||||
};
|
||||
in mkDerivation (rec {
|
||||
pname = "ghcjs";
|
||||
inherit version;
|
||||
src = fetchgit {
|
||||
url = git://github.com/ghcjs/ghcjs.git;
|
||||
rev = "64c3768186d73d8c185b42d4d14dfb943919ee56"; # master branch
|
||||
sha256 = "1w7rwcqzihg6h2j0khar7kjn8vdjg9ngjk6bndpiqcgf3kwfmvhf";
|
||||
# `src` is ghcjs's a3157072c2593debf2e45e751e9a8aa90b860b4d plus this
|
||||
# additional dependency bump: https://github.com/ghcjs/ghcjs/pull/408
|
||||
src = fetchFromGitHub {
|
||||
owner = "k0001";
|
||||
repo = "ghcjs";
|
||||
rev = "1b767e0b3dabdd1561bd17314d472651bfd9b97c";
|
||||
sha256 = "0j4vj47qljbcbrp3md3jwxwl2kz9k85visq6yi1x8wdch4wb2kgy";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
@@ -84,14 +84,19 @@ in mkDerivation (rec {
|
||||
];
|
||||
patches = [ ./ghcjs.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace Setup.hs --replace "/usr/bin/env" "${coreutils}/bin/env"
|
||||
substituteInPlace src/Compiler/Info.hs --replace "@PREFIX@" "$out"
|
||||
substituteInPlace Setup.hs \
|
||||
--replace "/usr/bin/env" "${coreutils}/bin/env"
|
||||
|
||||
substituteInPlace src/Compiler/Info.hs \
|
||||
--replace "@PREFIX@" "$out" \
|
||||
--replace "@VERSION@" "${version}"
|
||||
|
||||
substituteInPlace src-bin/Boot.hs \
|
||||
--replace "@PREFIX@" "$out" \
|
||||
--replace "@CC@" "${stdenv.cc}/bin/cc"
|
||||
'';
|
||||
preBuild = ''
|
||||
local topDir=$out/${libDir}
|
||||
local topDir=$out/lib/ghcjs-${version}
|
||||
mkdir -p $topDir
|
||||
|
||||
cp -r ${ghcjsBoot} $topDir/ghcjs-boot
|
||||
@@ -102,7 +107,7 @@ in mkDerivation (rec {
|
||||
|
||||
# Make the patches be relative their corresponding package's directory.
|
||||
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
|
||||
for patch in $topDir/ghcjs-boot/patches/*.patch; do
|
||||
for patch in "$topDir/ghcjs-boot/patches/"*.patch; do
|
||||
echo "fixing patch: $patch"
|
||||
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
|
||||
done
|
||||
@@ -116,13 +121,13 @@ in mkDerivation (rec {
|
||||
--with-gmp-libraries ${gmp}/lib
|
||||
'';
|
||||
passthru = {
|
||||
inherit libDir;
|
||||
isGhcjs = true;
|
||||
nativeGhc = ghc;
|
||||
inherit nodejs;
|
||||
};
|
||||
|
||||
homepage = "https://github.com/ghcjs/ghcjs";
|
||||
description = "GHCJS is a Haskell to JavaScript compiler that uses the GHC API";
|
||||
description = "A Haskell to JavaScript compiler that uses the GHC API";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = ghc.meta.platforms;
|
||||
maintainers = with stdenv.lib.maintainers; [ jwiegley cstrahan ];
|
||||
|
||||
@@ -60,15 +60,21 @@ index 3c68dcf..64f3cf7 100644
|
||||
, "--haddock-html"
|
||||
-- workaround for hoogle support being broken in haddock for GHC 7.10RC1
|
||||
diff --git a/src/Compiler/Info.hs b/src/Compiler/Info.hs
|
||||
index 33a401f..5d09c86 100644
|
||||
index 33a401f..79833c5 100644
|
||||
--- a/src/Compiler/Info.hs
|
||||
+++ b/src/Compiler/Info.hs
|
||||
@@ -49,7 +49,7 @@ compilerInfo nativeToo dflags = do
|
||||
@@ -48,13 +48,7 @@ compilerInfo nativeToo dflags = do
|
||||
|
||||
-- | the directory to use if started without -B flag
|
||||
getDefaultTopDir :: IO FilePath
|
||||
getDefaultTopDir = do
|
||||
-getDefaultTopDir = do
|
||||
- appdir <- getAppUserDataDirectory "ghcjs"
|
||||
+ let appdir = "@PREFIX@/share/ghcjs"
|
||||
return (appdir </> subdir </> "ghcjs")
|
||||
where
|
||||
targetARCH = arch
|
||||
- return (appdir </> subdir </> "ghcjs")
|
||||
- where
|
||||
- targetARCH = arch
|
||||
- targetOS = os
|
||||
- subdir = targetARCH ++ '-':targetOS ++ '-':getFullCompilerVersion
|
||||
+getDefaultTopDir = return "@PREFIX@/lib/ghcjs-@VERSION@"
|
||||
|
||||
getDefaultLibDir :: IO FilePath
|
||||
getDefaultLibDir = getDefaultTopDir
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
{ stdenv, fetchurl, bison, bash, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "go-1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://go.googlecode.com/files/go1.1.2.src.tar.gz;
|
||||
sha256 = "0w7bchhb4b053az3wjp6z342rs9lp9nxf4w2mnfd1b89d6sb7izz";
|
||||
};
|
||||
|
||||
buildInputs = [ bison bash makeWrapper ];
|
||||
|
||||
preUnpack = ''
|
||||
mkdir -p $out/share
|
||||
cd $out/share
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
cd ..
|
||||
if [ ! -d go ]; then
|
||||
mv * go
|
||||
fi
|
||||
cd go
|
||||
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go}
|
||||
# The os test wants to read files in an existing path. Just it don't be /usr/bin.
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go
|
||||
# Disable some tests
|
||||
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
||||
sed -i '/TestShutdownUnix/areturn' src/pkg/net/net_test.go
|
||||
|
||||
'';
|
||||
|
||||
# Unfortunately we have to use Mac OS X's own GCC
|
||||
preBuild = ''
|
||||
export PATH=/usr/bin:$PATH
|
||||
'';
|
||||
|
||||
#patches = [ ./cacert.patch ];
|
||||
|
||||
GOOS = "darwin";
|
||||
GOARCH = if stdenv.system == "x86_64-darwin" then "amd64" else "386";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
|
||||
# CGO is broken on Maverick. See: http://code.google.com/p/go/issues/detail?id=5926
|
||||
# Reevaluate once go 1.1.3 is out
|
||||
export CGO_ENABLED=0
|
||||
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Wrap the tools to define the location of the
|
||||
# libraries.
|
||||
for a in go gofmt godoc; do
|
||||
wrapProgram "$out/bin/$a" \
|
||||
--set "GOROOT" $out/share/go
|
||||
done
|
||||
|
||||
# Copy the emacs configuration for Go files.
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = "BSD";
|
||||
maintainers = with stdenv.lib.maintainers; [ zef ];
|
||||
platforms = stdenv.lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,31 +1,24 @@
|
||||
{ stdenv, lib, fetchurl, fetchgit, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl, Security }:
|
||||
{ stdenv, lib, fetchurl, tzdata, iana_etc, libcCross
|
||||
, pkgconfig
|
||||
, pcre
|
||||
, Security }:
|
||||
|
||||
let
|
||||
loader386 = "${glibc.out}/lib/ld-linux.so.2";
|
||||
loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2";
|
||||
loaderArm = "${glibc.out}/lib/ld-linux.so.3";
|
||||
srcs = {
|
||||
golang = fetchurl {
|
||||
url = https://github.com/golang/go/archive/go1.4.2.tar.gz;
|
||||
sha256 = "3e5d07bc5214a1ffe187cf6406c5b5a80ee44f12f6bca97a5463db0afee2f6ac";
|
||||
};
|
||||
tools = fetchgit {
|
||||
url = https://github.com/golang/tools.git;
|
||||
rev = "c836fe615a448dbf9ff5448c1aa657479a0d0aeb";
|
||||
sha256 = "0q9jnhmgmm3xzjss7ndsi6nyykmmb1y984n98118c2sipi183xp5";
|
||||
};
|
||||
};
|
||||
libc = if stdenv ? "cross" then libcCross else stdenv.cc.libc;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "go-1.4.2";
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-${version}";
|
||||
version = "1.4.2";
|
||||
|
||||
src = srcs.golang;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/golang/go/archive/go${version}.tar.gz";
|
||||
sha256 = "3e5d07bc5214a1ffe187cf6406c5b5a80ee44f12f6bca97a5463db0afee2f6ac";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
buildInputs = [ bison bash makeWrapper perl ]
|
||||
++ lib.optionals stdenv.isLinux [ glibc ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ pcre ];
|
||||
propagatedBuildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||
# describes an installation keeping the src.
|
||||
@@ -41,9 +34,6 @@ stdenv.mkDerivation {
|
||||
mv * go
|
||||
fi
|
||||
|
||||
mkdir -p $out/share/go/src/golang.org/x
|
||||
cp -r --no-preserve=mode,ownership ${srcs.tools} $out/share/go/src/golang.org/x/tools
|
||||
|
||||
cd go
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
|
||||
@@ -58,23 +48,43 @@ stdenv.mkDerivation {
|
||||
sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
|
||||
# Disable the hostname test
|
||||
sed -i '/TestHostname/areturn' src/os/os_test.go
|
||||
sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/net/lookup_unix.go
|
||||
# ParseInLocation fails the test
|
||||
sed -i '/TestParseInSydney/areturn' src/time/format_test.go
|
||||
|
||||
sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/net/lookup_unix.go
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
|
||||
sed -i 's,/lib/ld-linux.so.3,${loaderArm},' src/cmd/5l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c
|
||||
sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c
|
||||
|
||||
# Find the loader dynamically
|
||||
LOADER="$(find ${libc.out or libc}/lib -name ld-linux\* | head -n 1)"
|
||||
|
||||
# Replace references to the loader
|
||||
find src/cmd -name asm.c -exec sed -i "s,/lib/ld-linux.*\.so\.[0-9],$LOADER," {} \;
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
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 '/TestRead0/areturn' src/os/os_test.go
|
||||
sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
|
||||
sed -i '/TestDialDualStackLocalhost/areturn' src/net/dial_test.go
|
||||
|
||||
# remove IP resolving tests, on darwin they can find fe80::1%lo while expecting ::1
|
||||
sed -i '/TestResolveIPAddr/areturn' src/net/ipraw_test.go
|
||||
sed -i '/TestResolveTCPAddr/areturn' src/net/tcp_test.go
|
||||
sed -i '/TestResolveUDPAddr/areturn' src/net/udp_test.go
|
||||
|
||||
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
|
||||
'';
|
||||
|
||||
patches = [ ./cacert-1.4.patch ];
|
||||
patches = [
|
||||
./cacert-1.4.patch
|
||||
./remove-tools-1.4.patch
|
||||
];
|
||||
|
||||
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.system == "armv5tel-linux" then "arm"
|
||||
else if stdenv.isArm then "arm"
|
||||
else throw "Unsupported system";
|
||||
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
|
||||
GO386 = 387; # from Arch: don't assume sse2 on i686
|
||||
@@ -91,23 +101,16 @@ stdenv.mkDerivation {
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Build extra tooling
|
||||
# TODO: Fix godoc tests
|
||||
TOOL_ROOT=golang.org/x/tools/cmd
|
||||
go install -v $TOOL_ROOT/cover $TOOL_ROOT/vet $TOOL_ROOT/godoc
|
||||
go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.4";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = "BSD";
|
||||
maintainers = with stdenv.lib.maintainers; [ cstrahan ];
|
||||
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cstrahan wkennington ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
124
pkgs/development/compilers/go/1.5.nix
Normal file
124
pkgs/development/compilers/go/1.5.nix
Normal file
@@ -0,0 +1,124 @@
|
||||
{ stdenv, lib, fetchurl, tzdata, iana_etc, go_1_4, runCommand
|
||||
, perl, which, pkgconfig, patch
|
||||
, pcre
|
||||
, Security }:
|
||||
|
||||
let
|
||||
goBootstrap = runCommand "go-bootstrap" {} ''
|
||||
mkdir $out
|
||||
cp -rf ${go_1_4}/* $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.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/golang/go/archive/go${version}.tar.gz";
|
||||
sha256 = "1xd1nd1li7pdl72vq8zkh6m7ms3ajgyqz9a5d61gagm0cgj8zilz";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
nativeBuildInputs = [ perl which pkgconfig patch ];
|
||||
buildInputs = [ pcre ];
|
||||
propagatedBuildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||
# describes an installation keeping the src.
|
||||
preUnpack = ''
|
||||
mkdir -p $out/share
|
||||
cd $out/share
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
# Ensure that the source directory is named go
|
||||
cd ..
|
||||
if [ ! -d go ]; then
|
||||
mv * go
|
||||
fi
|
||||
|
||||
cd go
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
|
||||
# Disabling the 'os/http/net' tests (they want files not available in
|
||||
# chroot builds)
|
||||
rm src/net/{listen_test.go,parse_test.go,port_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
|
||||
|
||||
sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/net/lookup_unix.go
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
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 '/TestRead0/areturn' src/os/os_test.go
|
||||
sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
|
||||
|
||||
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./cacert-1.5.patch
|
||||
./remove-tools-1.5.patch
|
||||
];
|
||||
|
||||
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 throw "Unsupported system";
|
||||
GOARM = stdenv.lib.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";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
echo Building
|
||||
./all.bash
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
rm -r $out/share/go/pkg/bootstrap
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
disallowedReferences = [ go_1_4 ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.5";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cstrahan wkennington ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
http://code.google.com/p/go/source/detail?r=8b13b2ec6b18
|
||||
--- a/src/cmd/cgo/gcc.go 2014-07-02 12:00:12.171796197 +0200
|
||||
+++ b/src/cmd/cgo/gcc.go 2014-07-02 12:01:57.844472754 +0200
|
||||
@@ -840,6 +840,15 @@
|
||||
func (p *Package) gccErrors(stdin []byte) string {
|
||||
// TODO(rsc): require failure
|
||||
args := p.gccCmd()
|
||||
+
|
||||
+ // GCC 4.8.0 has a bug: it sometimes does not apply
|
||||
+ // -Wunused-value to values that are macros defined in system
|
||||
+ // headers. See issue 5118. Adding -Wsystem-headers avoids
|
||||
+ // that problem. This will produce additional errors, but it
|
||||
+ // doesn't matter because we will ignore all errors that are
|
||||
+ // not marked for the cgo-test file.
|
||||
+ args = append(args, "-Wsystem-headers")
|
||||
+
|
||||
if *debugGcc {
|
||||
fmt.Fprintf(os.Stderr, "$ %s <<EOF\n", strings.Join(args, " "))
|
||||
os.Stderr.Write(stdin)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user