Merge remote-tracking branch 'origin/master' into gcc-6

This commit is contained in:
Eelco Dolstra
2017-07-21 11:05:58 +02:00
1461 changed files with 36920 additions and 23576 deletions

View File

@@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out/bin"
echo -e '#!/bin/sh\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
'';
meta = with stdenv.lib; {

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
configurePhase = ''
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
./configure -clightgen -prefix $out -toolprefix ${tools}/bin/ '' +
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
(if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux");
installTargets = "documentation install";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
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 x86 x86_32 lib \
mv backend cfrontend common cparser driver flocq x86 x86_64 lib \
$lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
'';

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm_39, makeWrapper }:
{ stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm_4, makeWrapper }:
stdenv.mkDerivation rec {
version = "0.22.0";
version = "0.23.0";
name = "crystal-${version}-1";
arch =
{
@@ -14,20 +14,20 @@ stdenv.mkDerivation rec {
url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-1-${arch}.tar.gz";
sha256 =
{
"x86_64-linux" = "03c1nmjibz8f7yhrczd49gmccx4ivqz121c64hl384w69227p7bq";
"i686-linux" = "1s8gpmxa9wpcc2a9csl205lcpipn1i7gwybapby3q34y7xnq9160";
"x86_64-darwin" = "1bnfxb0hbkx4qlkc1l88sdhcnhacqzy31hh7ksz0prah83g6vbxa";
"x86_64-linux" = "0nhs7swbll8hrk15kmmywngkhij80x62axiskb1gjmiwvzhlh0qx";
"i686-linux" = "03xp8d3lqflzzm26lpdn4yavj87qzgd6xyrqxp2pn9ybwrq8fx8a";
"x86_64-darwin" = "1prz6c1gs8z7dgpdy2id2mjn1c8f5p2bf9b39985bav448njbyjz";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
};
src = fetchurl {
url = "https://github.com/crystal-lang/crystal/archive/${version}.tar.gz";
sha256 = "0iw5i4hjzfxykwfdyzix23pgm3gxd79r9yss3abvva8cf7ci37sv";
sha256 = "05ymwmjkl1b4m888p725kybpiap5ag2vj8l07d59j02inm5r0rcv";
};
# crystal on Darwin needs libiconv to build
buildInputs = [
boehmgc libatomic_ops pcre libevent llvm_39 makeWrapper
boehmgc libatomic_ops pcre libevent llvm_4 makeWrapper
] ++ stdenv.lib.optionals stdenv.isDarwin [
libiconv
];
@@ -86,6 +86,8 @@ stdenv.mkDerivation rec {
install -Dm644 etc/completion.bash $out/share/bash-completion/completions/crystal
install -Dm644 etc/completion.zsh $out/share/zsh/site-functions/_crystal
install -Dm644 man/crystal.1 $out/share/man/man1/crystal.1
install -Dm644 LICENSE $out/share/licenses/crystal/LICENSE
'';

View File

@@ -23,6 +23,8 @@ in stdenv.mkDerivation {
buildInputs = [ cmake pkgconfig libffi llvm_35 ]
++ stdenv.lib.optional doCheck perl;
patches = [ ./link-llvm.patch ];
inherit doCheck;
checkTarget = "tests";

View File

@@ -0,0 +1,10 @@
--- dale-39e16d8e89fa070de65a673d4462e783d530f95a-src.org/CMakeLists.txt 2017-06-22 08:01:05.839531242 +0100
+++ dale-39e16d8e89fa070de65a673d4462e783d530f95a-src/CMakeLists.txt 2017-06-22 07:59:11.777566801 +0100
@@ -78,6 +78,7 @@
execute_process (COMMAND ${LLVM_CONFIG} --libs
OUTPUT_VARIABLE LLVM_LIBS
OUTPUT_STRIP_TRAILING_WHITESPACE)
+STRING(REGEX REPLACE " " ";" LLVM_LIBS "${LLVM_LIBS}")
if (${D_LLVM_VERSION_MINOR} GREATER 4)
execute_process (COMMAND ${LLVM_CONFIG} --system-libs
OUTPUT_VARIABLE LLVM_SYSTEM_LIBS

View File

@@ -0,0 +1,41 @@
{ stdenv, fetchurl, autoconf, ... }:
stdenv.mkDerivation rec {
name = "gambit-bootstrap-${version}";
version = "4.8.8";
tarball_version = "v4_8_8";
src = fetchurl {
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-${tarball_version}-devel.tgz";
sha256 = "075k2z04d6svxqf9paj3xvp0mm0xzy0vbma1y61s0lkywdim8xjz";
};
buildInputs = [ autoconf ];
configurePhase = ''
./configure --prefix=$out --enable-single-host
'';
buildPhase = ''
# Copy the (configured) sources now, not later, so we don't have to filter out
# all the intermediate build products.
mkdir -p $out ; cp -rp . $out/
# build the gsc-boot* compiler
make bootstrap
'';
installPhase = ''
cp -fa ./ $out/
'';
forceShare = [ "info" ];
meta = {
description = "Optimizing Scheme to C compiler, bootstrap step";
homepage = "http://gambitscheme.org";
license = stdenv.lib.licenses.lgpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
};
}

View File

@@ -1,31 +1,75 @@
{ stdenv, fetchurl, openssl }:
{ stdenv, fetchurl, fetchgit, git, openssl, autoconf, pkgs }:
stdenv.mkDerivation rec {
name = "gambit-${version}";
version = "4.8.6";
devver = "4_8_6";
version = "4.8.8-f3ffeb6";
bootstrap = import ./bootstrap.nix ( pkgs );
src = fetchurl {
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${devver}-devel.tgz";
sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
# devver = "4_8_8";
# src = fetchurl {
# url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${version}-devel.tgz";
# sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
# };
src = fetchgit {
url = "https://github.com/feeley/gambit.git";
rev = "f3ffeb695aeea80c18c1b9ef276b57898c780dca";
sha256 = "1lqixsrgk9z2gj6z1nkys0pfd3m5zjxrp3gvqn2wpr9h7hjb8x06";
};
configureFlags = [
"--enable-single-host"
"--enable-shared"
"--enable-absolute-shared-libs"
"--enable-c-opt=-O6" "--enable-gcc-opts" "--enable-inline-jumps"
"--enable-thread-system=posix" "--enable-dynamic-tls"
"--enable-openssl"
];
buildInputs = [ openssl git autoconf bootstrap ];
buildInputs = [ openssl ];
configurePhase = ''
options=(
--prefix=$out
--enable-single-host
--enable-c-opt=-O2
--enable-gcc-opts
--enable-shared
--enable-absolute-shared-libs # Yes, NixOS will want an absolute path, and fix it.
--enable-poll
--enable-openssl
#--enable-multiple-versions # Nope, NixOS already does version multiplexing
#--enable-guide
#--enable-track-scheme
#--enable-high-res-timing
#--enable-max-processors=4
#--enable-multiple-vms
#--enable-dynamic-tls
#--enable-multiple-vms
#--enable-multiple-threaded-vms ## when SMP branch is merged in
#--enable-thread-system=posix ## default when --enable-multiple-vms is on.
#--enable-profile
#--enable-coverage
#--enable-inline-jumps
#--enable-char-size=1" ; default is 4
)
./configure ''${options[@]}
'';
buildPhase = ''
# Make bootstrap compiler, from release bootstrap
mkdir -p boot/wip-compiler &&
cp -rp ${bootstrap}/. boot/wip-compiler/. &&
chmod -R u+w boot &&
cd boot/wip-compiler && \
cp ../../gsc/makefile.in ../../gsc/*.scm gsc && \
(cd gsc && make bootclean ) &&
make bootstrap &&
cd ../.. &&
cp boot/wip-compiler/gsc/gsc gsc-boot &&
# Now use the bootstrap compiler to build the real thing!
make -j2 from-scratch
'';
doCheck = true;
meta = {
description = "Optimizing Scheme to C compiler";
homepage = "http://gambitscheme.org";
license = stdenv.lib.licenses.lgpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
};
}

View File

@@ -283,7 +283,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -401,7 +401,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -407,7 +407,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -35,6 +35,7 @@
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
assert langJava -> zip != null && unzip != null
@@ -312,6 +313,7 @@ stdenv.mkDerivation ({
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [binutils])
++ (optionals (buildPlatform != hostPlatform) [buildPackages.stdenv.cc])
++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat])
@@ -422,7 +424,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}
@@ -449,6 +451,8 @@ stdenv.mkDerivation ({
)
}
${if langAda then " --enable-libada" else ""}
--build=${buildPlatform.config}
--host=${hostPlatform.config}
--target=${targetPlatform.config}
${xwithArch}
${xwithCpu}

View File

@@ -1,25 +0,0 @@
From 5972cd58bde3bc8bacfe994e5b127c411241f255 Mon Sep 17 00:00:00 2001
From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 3 Jan 2017 05:36:40 +0000
Subject: [PATCH] * config/darwin-driver.c (darwin_driver_init):
Const-correctness fixes for first_period and second_period variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244010 138bc75d-0d04-0410-961f-82ee72b054a4
---
diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
index 0c4f0cd..e3ed79d 100644
--- a/gcc/config/darwin-driver.c
+++ b/gcc/config/darwin-driver.c
@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count,
if (vers_string != NULL)
{
char *asm_major = NULL;
- char *first_period = strchr(vers_string, '.');
+ const char *first_period = strchr(vers_string, '.');
if (first_period != NULL)
{
- char *second_period = strchr(first_period+1, '.');
+ const char *second_period = strchr(first_period+1, '.');
if (second_period != NULL)
asm_major = xstrndup (vers_string, second_period-vers_string);
else

View File

@@ -58,7 +58,7 @@ assert langGo -> langCC;
with stdenv.lib;
with builtins;
let version = "6.3.0";
let version = "6.4.0";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
@@ -72,8 +72,7 @@ let version = "6.3.0";
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
# target libraries and tools.
++ optional langAda ../gnat-cflags.patch
++ optional langFortran ../gfortran-driving.patch
++ optional hostPlatform.isDarwin ./darwin-const-correct.patch; # Kill this after 6.3.0
++ optional langFortran ../gfortran-driving.patch;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -213,8 +212,8 @@ stdenv.mkDerivation ({
builder = ../builder.sh;
src = fetchurl {
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
sha256 = "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph";
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
sha256 = "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5";
};
inherit patches;
@@ -404,7 +403,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -405,7 +405,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -1,15 +1,22 @@
{ stdenv, fetchurl, fetchgit, gambit, openssl, zlib, coreutils, rsync, bash }:
{ stdenv, fetchurl, fetchgit, gambit,
coreutils, rsync, bash,
openssl, zlib, sqlite, libxml2, libyaml, libmysql, lmdb, leveldb }:
stdenv.mkDerivation rec {
name = "gerbil-${version}";
version = "0.11";
src = fetchurl {
url = "https://github.com/vyzo/gerbil/archive/v${version}.tar.gz";
sha256 = "0mqg6cqdcf5qr7vk79x5zkls7z2wm8i3lhwn0b7i0g1m6yyyyff7";
version = "0.12-DEV";
src = fetchgit {
url = "https://github.com/vyzo/gerbil.git";
rev = "3657b6e940ea248e0b312f276590e38ff68997e7";
sha256 = "11ys7082ghkm4yikz4qxmv3jpxcr42jfi0jhjw1mpzbqdg6004w2";
};
buildInputs = [ gambit openssl zlib coreutils rsync bash ];
buildInputs = [
gambit openssl
coreutils rsync bash
zlib openssl zlib sqlite libxml2 libyaml libmysql lmdb leveldb
];
postPatch = ''
patchShebangs .
@@ -21,7 +28,13 @@ stdenv.mkDerivation rec {
buildPhase = ''
runHook preBuild
# Enable all optional libraries
substituteInPlace "src/std/build-features.ss" --replace '#f' '#t'
# Build, replacing make by build.sh
( cd src && sh build.sh )
runHook postBuild
'';

View File

@@ -9,8 +9,8 @@
let
inherit (bootPkgs) ghc;
version = "8.2.1-rc2";
preReleaseName = "ghc-8.2.0.20170507";
version = "8.2.1-rc3";
preReleaseName = "ghc-8.2.0.20170704";
commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
commonPreConfigure = ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
@@ -27,7 +27,7 @@ in stdenv.mkDerivation (rec {
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/${preReleaseName}-src.tar.xz";
sha256 = "1hy3l6nzkyhzwy9mii4zs51jv048zwvdqk1q3188jznz35392zrn";
sha256 = "0ccfybbjrmd8yzqbfdqvb6clz2kd005wi8sx3mfjmbkmxv0l4jry";
};
postPatch = "patchShebangs .";

View File

@@ -15,8 +15,6 @@ let
version = "8.1.20170106";
rev = "b4f2afe70ddbd0576b4eba3f82ba1ddc52e9b3bd";
outputs = [ "out" "doc" ];
commonPreConfigure = ''
echo ${version} >VERSION
echo ${rev} >GIT_COMMIT_ID
@@ -77,6 +75,8 @@ in stdenv.mkDerivation (rec {
done
'';
outputs = [ "out" "doc" ];
passthru = {
inherit bootPkgs;
} // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) {
@@ -101,26 +101,26 @@ in stdenv.mkDerivation (rec {
'';
configureFlags = [
"CC=${stdenv.ccCross}/bin/${cross.config}-cc"
"LD=${stdenv.binutils}/bin/${cross.config}-ld"
"AR=${stdenv.binutils}/bin/${cross.config}-ar"
"NM=${stdenv.binutils}/bin/${cross.config}-nm"
"RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib"
"CC=${stdenv.cc}/bin/${cross.config}-cc"
"LD=${stdenv.cc}/bin/${cross.config}-ld"
"AR=${stdenv.cc}/bin/${cross.config}-ar"
"NM=${stdenv.cc}/bin/${cross.config}-nm"
"RANLIB=${stdenv.cc}/bin/${cross.config}-ranlib"
"--target=${cross.config}"
"--enable-bootstrap-with-devel-snapshot"
] ++
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";
buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ];
buildInputs = commonBuildInputs;
dontSetConfigureCross = true;
configurePlatforms = [];
passthru = {
inherit bootPkgs cross;
cc = "${stdenv.ccCross}/bin/${cross.config}-cc";
cc = "${stdenv.cc}/bin/${cross.config}-cc";
ld = "${stdenv.binutils}/bin/${cross.config}-ld";
ld = "${stdenv.cc}/bin/${cross.config}-ld";
};
})

View File

@@ -113,6 +113,7 @@ stdenv.mkDerivation rec {
patches = [
./remove-tools-1.5.patch
./creds-test.patch
./fix-systime-1.6.patch
# This test checks for the wrong thing with recent tzdata. It's been fixed in master but the patch
# actually works on old versions too.

View File

@@ -0,0 +1,45 @@
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s
index e09b906ba5..fa8ff2f65c 100644
--- a/src/runtime/sys_darwin_amd64.s
+++ b/src/runtime/sys_darwin_amd64.s
@@ -157,6 +157,7 @@ systime:
// Fall back to system call (usually first call in this thread).
MOVQ SP, DI
MOVQ $0, SI
+ MOVQ $0, DX // required as of Sierra; Issue 16570
MOVL $(0x2000000+116), AX
SYSCALL
CMPQ AX, $0
diff --git a/src/syscall/syscall_darwin_amd64.go b/src/syscall/syscall_darwin_amd64.go
index 70b53b87f4..79083117b6 100644
--- a/src/syscall/syscall_darwin_amd64.go
+++ b/src/syscall/syscall_darwin_amd64.go
@@ -26,14 +26,21 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
}
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
+func Gettimeofday(tv *Timeval) error {
+ // The tv passed to gettimeofday must be non-nil.
+ // Before macOS Sierra (10.12), tv was otherwise unused and
+ // the answers came back in the two registers.
+ // As of Sierra, gettimeofday return zeros and populates
+ // tv itself.
sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
+ if err != nil {
+ return err
+ }
+ if sec != 0 || usec != 0 {
+ tv.Sec = sec
+ tv.Usec = usec
+ }
+ return nil
}
func SetKevent(k *Kevent_t, fd, mode, flags int) {

View File

@@ -1,40 +1,82 @@
{ stdenv, fetchgit, ocaml, zlib, pcre, neko, camlp4 }:
{ stdenv, fetchgit, bash, coreutils, ocaml, zlib, pcre, neko, camlp4 }:
stdenv.mkDerivation {
name = "haxe-3.4.2";
let
generic = { version, sha256, prePatch }:
stdenv.mkDerivation rec {
name = "haxe-${version}";
buildInputs = [ocaml zlib pcre neko camlp4];
buildInputs = [ocaml zlib pcre neko camlp4];
src = fetchgit {
url = "https://github.com/HaxeFoundation/haxe.git";
sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
fetchSubmodules = true;
src = fetchgit {
url = https://github.com/HaxeFoundation/haxe.git;
inherit sha256;
fetchSubmodules = true;
rev = "refs/tags/${version}";
};
# Tag 3.4.2
rev = "890f8c70cf23ce6f9fe0fdd0ee514a9699433ca7";
inherit prePatch;
buildFlags = [ "all" "tools" ];
installPhase = ''
install -vd "$out/bin" "$out/lib/haxe/std"
cp -vr haxe haxelib std "$out/lib/haxe"
# make wrappers which provide a temporary HAXELIB_PATH with symlinks to multiple repositories HAXELIB_PATH may point to
for name in haxe haxelib; do
cat > $out/bin/$name <<EOF
#!{bash}/bin/bash
if [[ "\$HAXELIB_PATH" =~ : ]]; then
NEW_HAXELIB_PATH="\$(${coreutils}/bin/mktemp -d)"
IFS=':' read -ra libs <<< "\$HAXELIB_PATH"
for libdir in "\''${libs[@]}"; do
for lib in "\$libdir"/*; do
if [ ! -e "\$NEW_HAXELIB_PATH/\$(${coreutils}/bin/basename "\$lib")" ]; then
${coreutils}/bin/ln -s "--target-directory=\$NEW_HAXELIB_PATH" "\$lib"
fi
done
done
export HAXELIB_PATH="\$NEW_HAXELIB_PATH"
$out/lib/haxe/$name "\$@"
rm -rf "\$NEW_HAXELIB_PATH"
else
exec $out/lib/haxe/$name "\$@"
fi
EOF
chmod +x $out/bin/$name
done
'';
setupHook = ./setup-hook.sh;
dontStrip = true;
meta = with stdenv.lib; {
description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
homepage = https://haxe.org;
license = with licenses; [ gpl2 bsd2 /*?*/ ]; # -> docs/license.txt
maintainers = [ maintainers.marcweber ];
platforms = platforms.linux ++ platforms.darwin;
};
};
in {
# this old version is required to compile some libraries
haxe_3_2 = generic {
version = "3.2.1";
sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3";
prePatch = ''
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' main.ml
sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/tools/haxelib/Main.hx
'';
};
prePatch = ''
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
'';
buildFlags = [ "all" "tools" ];
installPhase = ''
install -vd "$out/bin" "$out/lib/haxe/std"
install -vt "$out/bin" haxe haxelib
cp -vr std "$out/lib/haxe"
'';
setupHook = ./setup-hook.sh;
dontStrip = true;
meta = with stdenv.lib; {
description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
homepage = https://haxe.org;
license = with licenses; [ gpl2 bsd2 /*?*/ ]; # -> docs/license.txt
maintainers = [ maintainers.marcweber ];
platforms = platforms.linux ++ platforms.darwin;
haxe_3_4 = generic {
version = "3.4.2";
sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
prePatch = ''
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx
'';
};
}

View File

@@ -1,52 +0,0 @@
{ stdenv, fetchzip, haxe, neko, pcre, sqlite, zlib }:
stdenv.mkDerivation rec {
name = "hxcpp-3.2.27";
src = let
zipFile = stdenv.lib.replaceChars ["."] [","] name;
in fetchzip {
inherit name;
url = "http://lib.haxe.org/files/3.0/${zipFile}.zip";
sha256 = "1hw4kr1f8q7f4fkzis7kvkm7h1cxhv6cf5v1iq7rvxs2fxiys7fr";
};
NIX_LDFLAGS = "-lpcre -lz -lsqlite3";
outputs = [ "out" "lib" ];
patchPhase = ''
rm -rf bin lib project/thirdparty project/libs/sqlite/sqlite3.[ch]
find . -name '*.n' -delete
sed -i -re '/(PCRE|ZLIB)_DIR|\<sqlite3\.c\>/d' project/Build.xml
sed -i -e 's/mFromFile = "@";/mFromFile = "";/' tools/hxcpp/Linker.hx
sed -i -e '/dll_ext/s,HX_CSTRING("./"),HX_CSTRING("'"$lib"'/"),' \
src/hx/Lib.cpp
'';
buildInputs = [ haxe neko pcre sqlite zlib ];
targetArch = "linux-m${if stdenv.is64bit then "64" else "32"}";
buildPhase = ''
haxe -neko project/build.n -cp tools/build -main Build
haxe -neko run.n -cp tools/run -main RunMain
haxe -neko hxcpp.n -cp tools/hxcpp -main BuildTool
(cd project && neko build.n "ndll-$targetArch")
'';
installPhase = ''
for i in bin/Linux*/*.dso; do
install -vD "$i" "$lib/$(basename "$i")"
done
find *.n toolchain/*.xml build-tool/BuildCommon.xml src include \
-type f -exec install -vD -m 0644 {} "$out/lib/haxe/hxcpp/{}" \;
'';
meta = {
homepage = "http://lib.haxe.org/p/hxcpp";
description = "Runtime support library for the Haxe C++ backend";
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.linux;
};
}

View File

@@ -1,5 +1,7 @@
addHaxeLibPath() {
if [ ! -d "$1/lib/haxe/std" ]; then
addToSearchPath HAXELIB_PATH "$1/lib/haxe"
fi
}
envHooks+=(addHaxeLibPath)

View File

@@ -155,7 +155,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = true;
doCheck = !stdenv.isDarwin;
checkTarget = "testall";
# Julia's tests require read/write access to $HOME
preCheck = ''

View File

@@ -1,6 +1,6 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
, fixDarwinDylibNames
, enableManpages ? true
, enableManpages ? false
}:
let
@@ -9,7 +9,7 @@ let
name = "clang-${version}";
unpackPhase = ''
unpackFile ${fetch "cfe" "12n99m60aa680cir3ql56s1jsv6lp61hq4w9rabf4c6vpn7gi9ff"}
unpackFile ${fetch "cfe" "16vnv3msnvx33dydd17k2cq0icndi1a06bg5vcxkrhjjb1rqlwv1"}
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}

View File

@@ -1,8 +1,8 @@
{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
{ lowPrio, newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });
release_version = "4.0.0";
release_version = "4.0.1";
version = release_version; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
@@ -10,17 +10,28 @@ let
inherit sha256;
};
compiler-rt_src = fetch "compiler-rt" "059ipqq27gd928ay06f1ck3vw6y5h5z4zd766x8k0k7jpqimpwnk";
clang-tools-extra_src = fetch "clang-tools-extra" "16bwckgcxfn56mbqjlxi7fxja0zm9hjfa6s3ncm3dz98n5zd7ds1";
compiler-rt_src = fetch "compiler-rt" "0h5lpv1z554szi4r4blbskhwrkd78ir50v3ng8xvk1s86fa7gj53";
clang-tools-extra_src = fetch "clang-tools-extra" "1dhmp7ccfpr42bmvk3kp37ngjpf3a9m5d4kkpsn7d00hzi7fdl9m";
# Add man output without introducing extra dependencies.
overrideManOutput = drv:
let drv-manpages = drv.override { enableManpages = true; }; in
drv // { man = drv-manpages.man; /*outputs = drv.outputs ++ ["man"];*/ };
llvm = callPackage ./llvm.nix {
inherit compiler-rt_src stdenv;
};
clang-unwrapped = callPackage ./clang {
inherit clang-tools-extra_src stdenv;
};
self = {
llvm = callPackage ./llvm.nix {
inherit compiler-rt_src stdenv;
};
llvm = overrideManOutput llvm;
clang-unwrapped = overrideManOutput clang-unwrapped;
clang-unwrapped = callPackage ./clang {
inherit clang-tools-extra_src stdenv;
};
llvm-manpages = lowPrio self.llvm.man;
clang-manpages = lowPrio self.clang-unwrapped.man;
clang = wrapCC self.clang-unwrapped;

View File

@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetch "libcxx" "15ngfcjc3pjakpwfq7d4n546jj0rgfdv5rpb1qv9xgv9mp236kag";
src = fetch "libcxx" "0k6cmjcxnp2pyl8xwy1wkyyckkmdrjddim94yf1gzjbjy9qi22jj";
postUnpack = ''
unpackFile ${libcxxabi.src}

View File

@@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "libc++abi-${version}";
src = fetch "libcxxabi" "1n416kv27anabg9jsw6331r28ic30xk46p381lx2vbb2jrhwpafw";
src = fetch "libcxxabi" "0cqvzallxh0nwiijsf6i4d5ds9m5ijfzywg7376ncv50i64if24g";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;

View File

@@ -10,7 +10,7 @@
stdenv.mkDerivation {
name = "lld-${version}";
src = fetch "lld" "00km1qawk146pyjqa6aphcdzgkzrmg6cgk0ikg4661ffp5bn9q1k";
src = fetch "lld" "1v9nkpr158j4yd4zmi6rpnfxkp78r1fapr8wji9s6v176gji1kk3";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm ];

View File

@@ -17,7 +17,7 @@
stdenv.mkDerivation {
name = "lldb-${version}";
src = fetch "lldb" "0g83hbw1r4gd0z8hlph9i34xs6dlcc69vz3h2bqwkhb2qq2qzg9d";
src = fetch "lldb" "0yy43a27zx3r51b6gkv3v2mdiqcq3mf0ngki47ya0i30v3gx4cl4";
patches = [ ./lldb-libedit.patch ];
postPatch = ''

View File

@@ -16,13 +16,13 @@
, compiler-rt_src
, libcxxabi
, debugVersion ? false
, enableManpages ? true
, enableManpages ? false
, enableSharedLibraries ? true
, darwin
}:
let
src = fetch "llvm" "1giklnw71wzsgbqg9wb5x7dxnbj39m6zpfvskvzvhwvfz4fm244d";
src = fetch "llvm" "0l9bf7kdwhlj0kq1hawpyxhna1062z3h7qcz2y8nfl9dz2qksy6s";
shlib = if stdenv.isDarwin then "dylib" else "so";
# Used when creating a version-suffixed symlink of libLLVM.dylib
@@ -64,13 +64,6 @@ in stdenv.mkDerivation rec {
+ stdenv.lib.optionalString (enableSharedLibraries) ''
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
patch -p1 < ./llvm-outputs.patch
''
# Remove broken tests: (https://bugs.llvm.org//show_bug.cgi?id=31610)
+ ''
rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll
rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll
rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll
rm test/CodeGen/AMDGPU/runtime-metadata.ll
'';
# hacky fix: created binaries need to be run before installation
@@ -123,11 +116,11 @@ in stdenv.mkDerivation rec {
+ stdenv.lib.optionalString enableSharedLibraries ''
moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM.${shlib}" "$lib"
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
''
+ stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib
install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config

View File

@@ -10,7 +10,7 @@
stdenv.mkDerivation {
name = "openmp-${version}";
src = fetch "openmp" "09kf41zgv551fnv628kqhlwgqkd2bkiwii9gqi6q12djgdddhmfv";
src = fetch "openmp" "195dykamd39yhi5az7nqj3ksqhb3wq30l93jnfkxl0061qbknsgc";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

View File

@@ -0,0 +1,7 @@
{ stdenv, callPackage, Foundation, libobjc }:
callPackage ./generic-cmake.nix (rec {
inherit Foundation libobjc;
version = "5.0.1.1";
sha256 = "064pgsmanpybpbhpam9jv9n8aicx6mlyb7a91yzh3kcksmqsxmj8";
})

View File

@@ -0,0 +1,93 @@
{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which }:
let
llvm = callPackage ./llvm.nix { };
in
stdenv.mkDerivation rec {
name = "mono-${version}";
src = fetchurl {
inherit sha256;
url = "http://download.mono-project.com/sources/mono/${name}.tar.bz2";
};
buildInputs =
[ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python autoconf libtool automake cmake which
]
++ (stdenv.lib.optionals stdenv.isDarwin [ Foundation libobjc ]);
propagatedBuildInputs = [glib];
NIX_LDFLAGS = if stdenv.isDarwin then "" else "-lgcc_s" ;
# To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723
dontDisableStatic = true;
# In fact I think this line does not help at all to what I
# wanted to achieve: have mono to find libgdiplus automatically
configureFlags = [
"--x-includes=${libX11.dev}/include"
"--x-libraries=${libX11.out}/lib"
"--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so"
]
++ stdenv.lib.optionals withLLVM [
"--enable-llvm"
"--enable-llvmloaded"
"--with-llvm=${llvm}"
];
configurePhase = ''
patchShebangs ./
./autogen.sh --prefix $out
'';
# Attempt to fix this error when running "mcs --version":
# The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image
dontStrip = true;
# Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601
enableParallelBuilding = false;
# We want pkg-config to take priority over the dlls in the Mono framework and the GAC
# because we control pkg-config
patches = [ ./pkgconfig-before-gac.patch ];
# Patch all the necessary scripts. Also, if we're using LLVM, we fix the default
# LLVM path to point into the Mono LLVM build, since it's private anyway.
preBuild = ''
makeFlagsArray=(INSTALL=`type -tp install`)
substituteInPlace mcs/class/corlib/System/Environment.cs --replace /usr/share "$out/share"
'' + stdenv.lib.optionalString withLLVM ''
substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")"
'';
# Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps
# Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive
# http://www.mono-project.com/Config_DllMap
postBuild = ''
find . -name 'config' -type f | xargs \
sed -i -e "s@libX11.so.6@${libX11.out}/lib/libX11.so.6@g" \
-e "s@/.*libgdiplus.so@${libgdiplus}/lib/libgdiplus.so@g" \
'';
# Without this, any Mono application attempting to open an SSL connection will throw with
# The authentication or decryption has failed.
# ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server.
postInstall = ''
echo "Updating Mono key store"
$out/bin/cert-sync ${cacert}/etc/ssl/certs/ca-bundle.crt
''
# According to [1], gmcs is just mcs
# [1] https://github.com/mono/mono/blob/master/scripts/gmcs.in
+ ''
ln -s $out/bin/mcs $out/bin/gmcs
'';
meta = {
homepage = http://mono-project.com/;
description = "Cross platform, open source .NET development framework";
platforms = with stdenv.lib.platforms; darwin ++ linux;
maintainers = with stdenv.lib.maintainers; [ viric thoughtpolice obadz vrthra ];
license = stdenv.lib.licenses.free; # Combination of LGPL/X11/GPL ?
};
}

View File

@@ -0,0 +1,65 @@
diff -Naur mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets
--- mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets.old 2017-04-24 23:45:18.348116305 +0200
+++ mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets 2017-04-24 23:45:11.407051755 +0200
@@ -167,8 +167,8 @@
$(ReferencePath);
@(AdditionalReferencePath);
{HintPathFromItem};
- {TargetFrameworkDirectory};
{PkgConfig};
+ {TargetFrameworkDirectory};
{GAC};
{RawFileName};
$(OutDir)
diff -Naur mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets
--- mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets.old 2017-04-24 23:49:53.019616196 +0200
+++ mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets 2017-04-24 23:50:05.709729585 +0200
@@ -232,8 +232,8 @@
$(ReferencePath);
@(AdditionalReferencePath);
{HintPathFromItem};
- {TargetFrameworkDirectory};
{PkgConfig};
+ {TargetFrameworkDirectory};
{GAC};
{RawFileName};
$(OutDir)
diff -Naur mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets
--- mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets.old 2017-04-24 23:52:33.200037047 +0200
+++ mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets 2017-04-24 23:52:43.281125802 +0200
@@ -139,8 +139,8 @@
$(ReferencePath);
@(AdditionalReferencePath);
{HintPathFromItem};
- {TargetFrameworkDirectory};
{PkgConfig};
+ {TargetFrameworkDirectory};
{GAC};
{RawFileName};
$(OutDir)
diff -Naur mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
--- mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets.old 2017-04-24 23:54:02.585821594 +0200
+++ mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets 2017-04-24 23:54:09.313880438 +0200
@@ -234,8 +234,8 @@
$(ReferencePath);
@(AdditionalReferencePath);
{HintPathFromItem};
- {TargetFrameworkDirectory};
{PkgConfig};
+ {TargetFrameworkDirectory};
{GAC};
{RawFileName};
$(OutDir)
diff -Naur mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets
--- mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets.old 2017-04-24 23:55:46.244895155 +0200
+++ mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets 2017-04-24 23:55:51.998961342 +0200
@@ -232,8 +232,8 @@
$(ReferencePath);
@(AdditionalReferencePath);
{HintPathFromItem};
- {TargetFrameworkDirectory};
{PkgConfig};
+ {TargetFrameworkDirectory};
{GAC};
{RawFileName};
$(OutDir)

View File

@@ -24,6 +24,12 @@ stdenv.mkDerivation rec {
+ "fe87462d9c7a6ee27e28f5be5e4fc0ac87b34574.patch";
sha256 = "1jbmq6j32vg3qv20dbh82cp54886lgrh7gkcqins8a2y4l4dl3sc";
})
# https://github.com/HaxeFoundation/neko/pull/165
(fetchpatch {
url = "https://github.com/HaxeFoundation/neko/commit/"
+ "c6d9c6d796200990b3b6a53a4dc716c9192398e6.patch";
sha256 = "1pq0qhhb9gbhc3zbgylwp0amhwsz0q0ggpj6v2xgv0hfy7d63rcd";
})
];
buildInputs =

View File

@@ -1,8 +1,8 @@
import ./generic.nix {
major_version = "4";
minor_version = "04";
patch_version = "1";
sha256 = "11f2kcldpad9h5ihi1crad5lvv2501iccb2g4c8m197fnjac8b12";
patch_version = "2";
sha256 = "0bhgjzi78l10824qga85nlh18jg9lb6aiamf9dah1cs6jhzfsn6i";
# If the executable is stipped it does not work
dontStrip = true;

View File

@@ -0,0 +1,9 @@
import ./generic.nix {
major_version = "4";
minor_version = "05";
patch_version = "0";
sha256 = "1y9fw1ci9pwnbbrr9nwr8cq8vypcxwdf4akvxard3mxl2jx2g984";
# If the executable is stipped it does not work
dontStrip = true;
}

View File

@@ -33,7 +33,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib

View File

@@ -23,7 +23,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib

View File

@@ -190,7 +190,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
printLines ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support

View File

@@ -202,7 +202,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
printLines ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support

View File

@@ -3,6 +3,7 @@
, downloadUrl
, sha256_i686
, sha256_x86_64
, sha256_armv7l
, jceName
, jceDownloadUrl
, sha256JCE
@@ -34,10 +35,13 @@
, setJavaClassPath
}:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
assert stdenv.system == "i686-linux"
|| stdenv.system == "x86_64-linux"
|| stdenv.system == "armv7l-linux";
assert swingSupport -> xorg != null;
let
abortArch = abort "jdk requires i686-linux, x86_64-linux, or armv7l-linux";
/**
* The JRE libraries are in directories that depend on the CPU.
@@ -47,8 +51,10 @@ let
"i386"
else if stdenv.system == "x86_64-linux" then
"amd64"
else if stdenv.system == "armv7l-linux" then
"arm"
else
abort "jdk requires i686-linux or x86_64 linux";
abortArch;
jce =
if installjce then
@@ -59,6 +65,14 @@ let
}
else
"";
rSubPaths = [
"lib/${architecture}/jli"
"lib/${architecture}/server"
"lib/${architecture}/xawt"
"lib/${architecture}"
];
in
let result = stdenv.mkDerivation rec {
@@ -78,8 +92,14 @@ let result = stdenv.mkDerivation rec {
url = downloadUrl;
sha256 = sha256_x86_64;
}
else if stdenv.system == "armv7l-linux" then
requireFile {
name = "jdk-${productVersion}u${patchVersion}-linux-arm32-vfp-hflt.tar.gz";
url = downloadUrl;
sha256 = sha256_armv7l;
}
else
abort "jdk requires i686-linux or x86_64 linux";
abortArch;
nativeBuildInputs = [ file ]
++ stdenv.lib.optional installjce unzip;
@@ -134,18 +154,6 @@ let result = stdenv.mkDerivation rec {
cp -v UnlimitedJCEPolicy*/*.jar $jrePath/lib/security
fi
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/server
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/xawt
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
# set all the dynamic linkers
find $out -type f -perm -0100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
if test -z "$pluginSupport"; then
rm -f $out/bin/javaws
if test -n "$installjdk"; then
@@ -157,17 +165,28 @@ let result = stdenv.mkDerivation rec {
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
mkdir -p $out/nix-support
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
EOF
'';
postFixup = ''
rpath+="''${rpath:+:}${stdenv.lib.concatStringsSep ":" (map (a: "$jrePath/${a}") rSubPaths)}"
# set all the dynamic linkers
find $out -type f -perm -0100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
# Oracle Java Mission Control needs to know where libgtk-x11 and related is
if test -n "$installjdk"; then
if test -n "$installjdk" -a -x $out/bin/jmc; then
wrapProgram "$out/bin/jmc" \
--suffix-each LD_LIBRARY_PATH ':' "${rpath}"
--suffix-each LD_LIBRARY_PATH ':' "$rpath"
fi
'';
@@ -192,7 +211,7 @@ let result = stdenv.mkDerivation rec {
meta = with stdenv.lib; {
license = licenses.unfree;
platforms = [ "i686-linux" "x86_64-linux" ]; # some inherit jre.meta.platforms
platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" ]; # some inherit jre.meta.platforms
};
}; in result

View File

@@ -4,6 +4,7 @@ import ./jdk-linux-base.nix {
downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
sha256_i686 = "0m3i1n1im1nlwb06wlsdajv19cd3zhrjkw8zbyjfznydn6qs4s80";
sha256_x86_64 = "0dhj623ya01glcl3iir9ajifcrf6awhvpk936x9cxfj8zfyibck2";
sha256_armv7l = "0ja97nqn4x0ji16c7r6i9nnnj3745br7qlbj97jg1s8m2wk7f9jd";
jceName = "jce_policy-8.zip";
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";

View File

@@ -4,6 +4,7 @@ import ./jdk-linux-base.nix {
downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
sha256_i686 = "0m3i1n1im1nlwb06wlsdajv19cd3zhrjkw8zbyjfznydn6qs4s80";
sha256_x86_64 = "0dhj623ya01glcl3iir9ajifcrf6awhvpk936x9cxfj8zfyibck2";
sha256_armv7l = "0ja97nqn4x0ji16c7r6i9nnnj3745br7qlbj97jg1s8m2wk7f9jd";
jceName = "jce_policy-8.zip";
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";

View File

@@ -3,13 +3,13 @@
stdenv.mkDerivation ( rec {
name = "ponyc-${version}";
version = "0.14.0";
version = "0.15.0";
src = fetchFromGitHub {
owner = "ponylang";
repo = "ponyc";
rev = version;
sha256 = "0zzr3mmjp7010d3jfly6lbwaib546praml97kgj92yixahnwz533";
sha256 = "02hmn066jswaij2ib0faabm2i9cqz562z6s0vakgwnxyrk4qayif";
};
buildInputs = [ llvm makeWrapper which ];

View File

@@ -1,13 +1,13 @@
{stdenv, fetchFromGitHub, ponyc }:
stdenv.mkDerivation {
name = "pony-stable-unstable-2017-03-30";
name = "pony-stable-unstable-2017-04-20";
src = fetchFromGitHub {
owner = "jemc";
owner = "ponylang";
repo = "pony-stable";
rev = "39890c7f11f79009630de6b551bd076868f7f5a2";
sha256 = "1w15dg4l03zzncpllwww8jhsj7z1wgvhf89n7agr9f1w9m2zpskc";
rev = "b2ea566b02ec40480f888652b04eaa5f191a241e";
sha256 = "1bixkxccsrnyip3yp42r14rbhk832pvzwbkh6ash4ip2isxa6b19";
};
buildInputs = [ ponyc ];

View File

@@ -4,13 +4,13 @@ with lib;
mkDerivation rec {
pname = "psc-package";
version = "0.1.1";
version = "0.2.0";
src = fetchFromGitHub {
owner = "purescript";
repo = pname;
rev = "v${version}";
sha256 = "078xjn10yq4i0ff78bxscvxhn29p3s7iwv3pjyqxzlhaymn5949l";
sha256 = "0vid8vc8n8xj0qa4gnm1any9s18rdh7yn960vgix17r7a3bdndwb";
};
isLibrary = false;

View File

@@ -2,12 +2,12 @@
ocaml, opam, topkg, menhir, merlin_extend, ppx_tools_versioned, utop }:
let
version = "1.13.4";
version = "2.0.0";
src = fetchFromGitHub {
owner = "facebook";
repo = "reason";
rev = version;
sha256 = "03r2ciikgwaq1dkzgzc8n7h7y0q95ajh6n9bb2n5bpgfhwkr1wqi";
sha256 = "0l3lwfvppplah707rq5nqjav2354lq6d7xfflfigkzhn74hlx6iy";
};
meta = with stdenv.lib; {
homepage = https://facebook.github.io/reason/;

View File

@@ -7,7 +7,7 @@ let
bootstrapHash =
if stdenv.system == "x86_64-linux"
then "21f38f46bf16373d3240a38b775e1acff9bb429f1570a4d4da8b3000315d0085"
then "0svlm4bxsdhdn4jsv46f278kid23a9w978q2137qrba4xnyb06kf"
else throw "missing bootstrap hash for platform ${stdenv.system}";
src = fetchurl {
@@ -15,7 +15,7 @@ let
sha256 = bootstrapHash;
};
version = "2017-05-30";
version = "2017-06-26";
in import ./binaryBuild.nix
{ inherit stdenv fetchurl makeWrapper cacert zlib buildRustPackage curl;
inherit version src platform;

View File

@@ -10,6 +10,7 @@
, targetPatches
, targetToolchains
, doCheck ? true
, buildPlatform, hostPlatform
} @ args:
let
@@ -137,7 +138,7 @@ stdenv.mkDerivation {
inherit doCheck;
dontSetConfigureCross = true;
configurePlatforms = [];
# https://github.com/NixOS/nixpkgs/pull/21742#issuecomment-272305764
# https://github.com/rust-lang/rust/issues/30181

View File

@@ -9,11 +9,11 @@
stdenv.mkDerivation rec {
name = "sbcl-${version}";
version = "1.3.17";
version = "1.3.19";
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
sha256 = "1bqd39cqcv129zxvp3w3z1x46m9g9nmgslnlrvcsbqwd69vgbfcl";
sha256 = "0660gw43myikpa6n2qjhjxz61ilqazva4v8shljgwymag99risxm";
};
patchPhase = ''

View File

@@ -1,30 +1,35 @@
{ stdenv, fetchzip, fetchgit, boost, cmake }:
let jsoncpp = fetchzip {
url = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
}; in
let
version = "0.4.13";
rev = "0fb4cb1ab9bb4b6cc72e28cc5a1753ad14781f14";
sha256 = "0rhrm0bmk5s2358j40yx7dzr1938q17dchzflrxw6y7yvkhscxrm";
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
jsoncpp = fetchzip {
url = jsoncppURL;
sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
};
in
let commit = "68ef5810593e7c8092ed41d5f474dd43141624eb"; in
stdenv.mkDerivation rec {
version = "0.4.11";
stdenv.mkDerivation {
name = "solc-${version}";
# Cannot use `fetchFromGitHub' because of submodules
src = fetchgit {
url = "https://github.com/ethereum/solidity";
rev = commit;
sha256 = "13zycybf23yvf3hkf9zgw9gbc1y4ifzxaf7sll69bsn24fcyq961";
inherit rev sha256;
};
patchPhase = ''
echo >commit_hash.txt ${commit}
echo >commit_hash.txt '${rev}'
echo >prerelease.txt
substituteInPlace deps/jsoncpp.cmake \
--replace https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz ${jsoncpp}
--replace '${jsoncppURL}' ${jsoncpp}
substituteInPlace cmake/EthCompilerSettings.cmake \
--replace 'add_compile_options(-Werror)' ""
substituteInPlace cmake/EthDependencies.cmake \
--replace 'set(Boost_USE_STATIC_LIBS ON)' \
'set(Boost_USE_STATIC_LIBS OFF)'
'';
buildInputs = [ boost cmake ];
@@ -34,6 +39,7 @@ stdenv.mkDerivation rec {
longDescription = "This package also includes `lllc', the LLL compiler.";
homepage = https://github.com/ethereum/solidity;
license = stdenv.lib.licenses.gpl3;
platforms = with stdenv.lib.platforms; linux ++ darwin;
maintainers = [ stdenv.lib.maintainers.dbrock ];
inherit version;
};

View File

@@ -1,12 +1,13 @@
--- swift/utils/build-script-impl 2017-01-23 12:47:20.401326309 -0600
+++ swift-pax/utils/build-script-impl 2017-01-23 13:24:10.339366996 -0600
@@ -1823,6 +1823,16 @@ function set_lldb_xcodebuild_options() {
@@ -1823,6 +1823,17 @@ function set_lldb_xcodebuild_options() {
fi
}
+## XXX: Taken from nixpkgs /pkgs/stdenv/generic/setup.sh
+isELF() {
+ local fn="$1"
+ local fd
+ local magic
+ exec {fd}< "$fn"
+ read -n 4 -u $fd magic

View File

@@ -2,10 +2,10 @@
with stdenv.lib;
let
date = "20170605";
date = "20170710";
version = "0.9.27pre-${date}";
rev = "3e4b7693bfd5b76570b35558c83a935326513eff";
sha256 = "0m5k1df73kakvg9xz06y3nlac4mwfccni6hdijaf4w8fyy3zz4bg";
rev = "2acb04f7f2077a4cff103421d79ceee48441918a";
sha256 = "1rh89dx1myqfm752d4rlzrm8aadfm17fm88ps0q9ibmbxavb45qw";
in
stdenv.mkDerivation rec {

View File

@@ -1,13 +1,14 @@
{stdenv, fetchFromGitHub, cmake}:
stdenv.mkDerivation rec {
name = "wla-dx-git-2016-02-27";
version = "2017-06-05";
name = "wla-dx-git-${version}";
src = fetchFromGitHub {
owner = "vhelin";
repo = "wla-dx";
rev = "8189fe8d5620584ea16563875ff3c5430527c86a";
sha256 = "02zgkcyfx7y8j6jvyi12lm29fydnd7m3rxv6g2psv23fyzmpkkir";
rev = "ae6843f9711cbc2fa6dd8c200877b40bd2bcad7f";
sha256 = "09c2kz12ld97ad41j6r8r65jknllrak1x8r43fgr26x7hdlxz5c6";
};
hardeningDisable = [ "format" ];

View File

@@ -1,17 +1,28 @@
{ stdenv, pkgs, fetchurl, unzip, makeWrapper, setJavaClassPath, swingSupport ? true }:
with pkgs;
{ stdenv, lib, fetchurl, unzip, makeWrapper, setJavaClassPath
, zulu, glib, libxml2, libav_0_8, ffmpeg, libxslt, mesa_noglu, alsaLib
, fontconfig, freetype, gnome2, cairo, gdk_pixbuf, atk, xorg
, swingSupport ? true }:
let
version = "8.19.0.1";
openjdk = "8.0.112";
version = "8.21.0.1";
openjdk = "8.0.131";
sha256_linux = "1icb6in1197n44wk2cqnrxr7w0bd5abxxysfrhbg56jlb9nzmp4x";
sha256_darwin = "0kxwh62a6kckc9l9jkgakf86lqkqazp3dwfwaxqc4cg5zczgbhmd";
sha256_linux = "0cr1wvk1ifdq69ia8sr6171yzciba8l5x7dszwa5g2v0vmmqq88p";
sha256_darwin = "0xq9bdzbdq8wq48gj6j56bw30l2iafz6sy1wdhrf92n9bnz5qmw7";
platform = if stdenv.isDarwin then "macosx" else "linux";
hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
extension = if stdenv.isDarwin then "zip" else "tar.gz";
libraries = [
stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu
xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango
gnome2.gtk cairo gdk_pixbuf atk
] ++ (lib.optionals swingSupport (with xorg; [
xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp
xorg.libXt xorg.libXrender stdenv.cc.cc
]));
in stdenv.mkDerivation rec {
inherit version openjdk platform hash extension;
@@ -22,7 +33,7 @@ in stdenv.mkDerivation rec {
sha256 = hash;
};
buildInputs = [ makeWrapper ] ++ stdenv.lib.optional stdenv.isDarwin [ unzip ];
buildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin unzip;
installPhase = ''
mkdir -p $out
@@ -43,7 +54,7 @@ in stdenv.mkDerivation rec {
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
mkdir -p $out/nix-support
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
@@ -51,9 +62,6 @@ in stdenv.mkDerivation rec {
EOF
'';
libraries = [ stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango gnome2.gtk cairo gdk_pixbuf atk ]
++ (if swingSupport then [ xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt xorg.libXrender stdenv.cc.cc ] else [ ]);
rpath = stdenv.lib.strings.makeLibraryPath libraries;
passthru = {
@@ -64,8 +72,11 @@ in stdenv.mkDerivation rec {
homepage = https://www.azul.com/products/zulu/;
license = licenses.gpl2;
description = "Certified builds of OpenJDK";
longDescription = "Certified builds of OpenJDK that can be deployed across multiple operating systems, containers, hypervisors and Cloud platforms";
maintainers = with maintainers; [ nequissimus ];
longDescription = ''
Certified builds of OpenJDK that can be deployed across multiple
operating systems, containers, hypervisors and Cloud platforms.
'';
maintainers = with maintainers; [ nequissimus fpletz ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
}