Merge branch 'staging-next' into staging
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ lib, stdenv, makeWrapper, fetchurl, requireFile, perl, ncurses5, expat, python27, zlib
|
||||
, gcc48, gcc49, gcc5, gcc6, gcc7
|
||||
, xorg, gtk2, gdk_pixbuf, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
|
||||
, addOpenGLRunpath
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -39,7 +40,7 @@ let
|
||||
|
||||
outputs = [ "out" "lib" "doc" ];
|
||||
|
||||
nativeBuildInputs = [ perl makeWrapper ];
|
||||
nativeBuildInputs = [ perl makeWrapper addOpenGLRunpath ];
|
||||
buildInputs = [ gdk_pixbuf ]; # To get $GDK_PIXBUF_MODULE_FILE via setup-hook
|
||||
runtimeDependencies = [
|
||||
ncurses5 expat python zlib glibc
|
||||
@@ -143,10 +144,19 @@ let
|
||||
else
|
||||
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
|
||||
fi
|
||||
patchelf --set-rpath $rpath2 --force-rpath $i
|
||||
patchelf --set-rpath "$rpath2" --force-rpath $i
|
||||
done < <(find $out $lib $doc -type f -print0)
|
||||
'';
|
||||
|
||||
# Set RPATH so that libcuda and other libraries in
|
||||
# /run/opengl-driver(-32)/lib can be found. See the explanation in
|
||||
# addOpenGLRunpath. Don't try to figure out which libraries really need
|
||||
# it, just patch all (but not the stubs libraries). Note that
|
||||
# --force-rpath prevents changing RPATH (set above) to RUNPATH.
|
||||
postFixup = ''
|
||||
addOpenGLRunpath --force-rpath {$out,$lib}/lib/lib*.so
|
||||
'';
|
||||
|
||||
# cuda-gdb doesn't run correctly when not using sandboxing, so
|
||||
# temporarily disabling the install check. This should be set to true
|
||||
# when we figure out how to get `cuda-gdb --version` to run correctly
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src }:
|
||||
|
||||
let
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
self = stdenv.mkDerivation {
|
||||
name = "clang-${version}";
|
||||
|
||||
unpackPhase = ''
|
||||
unpackFile ${fetch "cfe" "0x065d0w9b51xvdjxwfzjxng0gzpbx45fgiaxpap45ragi61dqjn"}
|
||||
mv cfe-${version}.src clang
|
||||
sourceRoot=$PWD/clang
|
||||
unpackFile ${clang-tools-extra_src}
|
||||
mv clang-tools-extra-* $sourceRoot/tools/extra
|
||||
'';
|
||||
|
||||
buildInputs = [ cmake libxml2 llvm ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
] ++
|
||||
# Maybe with compiler-rt this won't be needed?
|
||||
(stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++
|
||||
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");
|
||||
|
||||
patches = [ ./purity.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp
|
||||
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
|
||||
'';
|
||||
|
||||
# Clang expects to find LLVMgold in its own prefix
|
||||
# Clang expects to find sanitizer libraries in its own prefix
|
||||
postInstall = ''
|
||||
if [ -e ${llvm}/lib/LLVMgold.so ]; then
|
||||
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
|
||||
fi
|
||||
|
||||
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
|
||||
ln -sv $out/bin/clang $out/bin/cpp
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
|
||||
isClang = true;
|
||||
inherit llvm;
|
||||
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
||||
inherit gcc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.ncsa;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
};
|
||||
in self
|
||||
@@ -1,17 +0,0 @@
|
||||
--- a/lib/Driver/Tools.cpp 2015-07-31 00:47:41.000000000 +0200
|
||||
+++ b/lib/Driver/Tools.cpp 2015-09-11 21:30:50.057895565 +0200
|
||||
@@ -8150,15 +8150,6 @@
|
||||
CmdArgs.push_back("-shared");
|
||||
}
|
||||
|
||||
- if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb ||
|
||||
- Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb ||
|
||||
- (!Args.hasArg(options::OPT_static) &&
|
||||
- !Args.hasArg(options::OPT_shared))) {
|
||||
- CmdArgs.push_back("-dynamic-linker");
|
||||
- CmdArgs.push_back(Args.MakeArgString(
|
||||
- D.DyldPrefix + getLinuxDynamicLinker(Args, ToolChain)));
|
||||
- }
|
||||
-
|
||||
CmdArgs.push_back("-o");
|
||||
CmdArgs.push_back(Output.getFilename());
|
||||
@@ -1,59 +0,0 @@
|
||||
{ newScope, stdenv, libstdcxxHook, isl, fetchurl
|
||||
, overrideCC, wrapCCWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
}:
|
||||
|
||||
let
|
||||
version = "3.7.1";
|
||||
|
||||
fetch = fetch_v version;
|
||||
fetch_v = ver: name: sha256: fetchurl {
|
||||
url = "https://releases.llvm.org/${ver}/${name}-${ver}.src.tar.xz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
compiler-rt_src = fetch "compiler-rt" "10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx";
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "0sxw2l3q5msbrwxv1ck72arggdw6n5ysi929gi69ikniranfv4aa";
|
||||
|
||||
tools = stdenv.lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv isl version fetch; });
|
||||
in {
|
||||
llvm = callPackage ./llvm.nix {
|
||||
inherit compiler-rt_src;
|
||||
inherit (targetLlvmLibraries) libcxxabi;
|
||||
};
|
||||
|
||||
clang-unwrapped = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
};
|
||||
|
||||
clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
|
||||
|
||||
libstdcxxClang = wrapCCWith {
|
||||
cc = tools.clang-unwrapped;
|
||||
extraPackages = [ libstdcxxHook ];
|
||||
};
|
||||
|
||||
libcxxClang = wrapCCWith {
|
||||
cc = tools.clang-unwrapped;
|
||||
extraPackages = [ targetLlvmLibraries.libcxx targetLlvmLibraries.libcxxabi ];
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb.nix {};
|
||||
});
|
||||
|
||||
libraries = stdenv.lib.makeExtensible (libraries: let
|
||||
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv isl version fetch; });
|
||||
in {
|
||||
|
||||
stdenv = overrideCC stdenv buildLlvmTools.clang;
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libc++ {};
|
||||
|
||||
libcxxabi = callPackage ./libc++abi.nix {};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
@@ -1,30 +0,0 @@
|
||||
diff -ru -x '*~' libcxx-3.4.2.src-orig/lib/CMakeLists.txt libcxx-3.4.2.src/lib/CMakeLists.txt
|
||||
--- libcxx-3.4.2.src-orig/lib/CMakeLists.txt 2013-11-15 18:18:57.000000000 +0100
|
||||
+++ libcxx-3.4.2.src/lib/CMakeLists.txt 2014-09-24 14:04:01.000000000 +0200
|
||||
@@ -56,7 +56,7 @@
|
||||
"-compatibility_version 1"
|
||||
"-current_version ${LIBCXX_VERSION}"
|
||||
"-install_name /usr/lib/libc++.1.dylib"
|
||||
- "-Wl,-reexport_library,/usr/lib/libc++abi.dylib"
|
||||
+ "-Wl,-reexport_library,${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib"
|
||||
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
|
||||
"/usr/lib/libSystem.B.dylib")
|
||||
else()
|
||||
@@ -64,14 +64,14 @@
|
||||
list(FIND ${CMAKE_OSX_ARCHITECTURES} "armv7" OSX_HAS_ARMV7)
|
||||
if (OSX_HAS_ARMV7)
|
||||
set(OSX_RE_EXPORT_LINE
|
||||
- "${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib"
|
||||
+ "${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib"
|
||||
"-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++sjlj-abi.exp")
|
||||
else()
|
||||
set(OSX_RE_EXPORT_LINE
|
||||
- "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib")
|
||||
+ "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib")
|
||||
endif()
|
||||
else()
|
||||
- set (OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
|
||||
+ set (OSX_RE_EXPORT_LINE "${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
|
||||
endif()
|
||||
|
||||
list(APPEND link_flags
|
||||
@@ -1,48 +0,0 @@
|
||||
{ lib, stdenv, fetch, cmake, libcxxabi, fixDarwinDylibNames, version }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libc++-${version}";
|
||||
|
||||
src = fetch "libcxx" "0i7iyzk024krda5spfpfi8jksh83yp3bxqkal0xp76ffi11bszrm";
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxxabi.src}
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
# Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
|
||||
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include")
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./darwin.patch
|
||||
./r242056.patch
|
||||
# glibc 2.26 fix
|
||||
./xlocale-glibc-2.26.patch
|
||||
];
|
||||
|
||||
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
|
||||
"-DLIBCXX_LIBCPPABI_VERSION=2"
|
||||
"-DLIBCXX_CXX_ABI=libcxxabi"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with stdenv.lib.licenses; [ ncsa mit ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
--- a/include/string 2015/07/13 20:04:56 242056
|
||||
+++ b/include/string 2015/07/18 20:40:46 242623
|
||||
@@ -1936,7 +1936,12 @@
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
|
||||
- : __r_(__a)
|
||||
+#if _LIBCPP_STD_VER <= 14
|
||||
+ _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
|
||||
+#else
|
||||
+ _NOEXCEPT
|
||||
+#endif
|
||||
+: __r_(__a)
|
||||
{
|
||||
#if _LIBCPP_DEBUG_LEVEL >= 2
|
||||
__get_db()->__insert_c(this);
|
||||
@@ -1,6 +0,0 @@
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
@@ -1,17 +0,0 @@
|
||||
diff --git a/include/__locale b/include/__locale
|
||||
index 1989558..1e42905 100644
|
||||
--- a/include/__locale
|
||||
+++ b/include/__locale
|
||||
@@ -34,10 +34,10 @@
|
||||
# include <support/solaris/xlocale.h>
|
||||
#elif defined(_NEWLIB_VERSION)
|
||||
# include <support/newlib/xlocale.h>
|
||||
-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
+#elif (defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
|| defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
|
||||
# include <xlocale.h>
|
||||
-#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||
+#endif // __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
@@ -1,61 +0,0 @@
|
||||
{ stdenv, cmake, fetch, fetchpatch, libcxx, libunwind, llvm, version }:
|
||||
|
||||
let
|
||||
# Newer LLVMs (3.8 onwards) have changed how some basic C++ stuff works, which breaks builds of this older version
|
||||
llvm38-and-above = fetchpatch {
|
||||
url = "https://trac.macports.org/raw-attachment/ticket/50304/0005-string-Fix-exception-declaration.patch";
|
||||
sha256 = "1lm38n7s0l5dbl7kp4i49pvzxz1mcvlr2vgsnj47agnwhhm63jvr";
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
name = "libc++abi-${version}";
|
||||
|
||||
src = fetch "libcxxabi" "0ambfcmr2nh88hx000xb7yjm9lsqjjz49w5mlf6dlxzmj3nslzx4";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxx.src}
|
||||
unpackFile ${llvm.src}
|
||||
export NIX_CFLAGS_COMPILE+=" -I$PWD/include"
|
||||
export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_INCLUDES=$PWD/$(ls -d libcxx-*)/include"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
'';
|
||||
|
||||
# I can't use patches directly because this is actually a patch for libc++'s source, which we manually extract
|
||||
# into the libc++abi build environment above.
|
||||
prePatch = ''(
|
||||
cd ../libcxx-*
|
||||
patch -p1 < ${llvm38-and-above}
|
||||
)'';
|
||||
|
||||
installPhase = if stdenv.isDarwin
|
||||
then ''
|
||||
for file in lib/*.dylib; do
|
||||
# this should be done in CMake, but having trouble figuring out
|
||||
# the magic combination of necessary CMake variables
|
||||
# if you fancy a try, take a look at
|
||||
# http://www.cmake.org/Wiki/CMake_RPATH_handling
|
||||
install_name_tool -id $out/$file $file
|
||||
done
|
||||
make install
|
||||
install -d 755 $out/include
|
||||
install -m 644 ../include/*.h $out/include
|
||||
''
|
||||
else ''
|
||||
install -d -m 755 $out/include $out/lib
|
||||
install -m 644 lib/libc++abi.so.1.0 $out/lib
|
||||
install -m 644 ../include/cxxabi.h $out/include
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxxabi.llvm.org/;
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with stdenv.lib.licenses; [ ncsa mit ];
|
||||
maintainers = with stdenv.lib.maintainers; [ vlstill ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
{ stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, zlib
|
||||
, ncurses
|
||||
, swig
|
||||
, which
|
||||
, libedit
|
||||
, llvm
|
||||
, clang-unwrapped
|
||||
, python2
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "lldb-${version}";
|
||||
|
||||
src = fetch "lldb" "008fdbyza13ym3v0xpans4z4azw4y16hcbgrrnc4rx2mxwaw62ws";
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's|/usr/bin/env||' \
|
||||
scripts/Python/finish-swig-Python-LLDB.sh \
|
||||
scripts/Python/build-swig-Python.sh
|
||||
'';
|
||||
|
||||
buildInputs = [ cmake python2 which swig ncurses zlib libedit ];
|
||||
|
||||
preConfigure = ''
|
||||
export CXXFLAGS="-pthread"
|
||||
export LDFLAGS="-ldl"
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
|
||||
"-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}"
|
||||
"-DPYTHON_VERSION_MAJOR=2"
|
||||
"-DPYTHON_VERSION_MINOR=7"
|
||||
"-DLLDB_DISABLE_LIBEDIT=1" # https://llvm.org/bugs/show_bug.cgi?id=28898
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A next-generation high-performance debugger";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.ncsa;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
{ stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, perl
|
||||
, groff
|
||||
, cmake
|
||||
, python2
|
||||
, libffi
|
||||
, libbfd
|
||||
, libxml2
|
||||
, ncurses
|
||||
, version
|
||||
, zlib
|
||||
, compiler-rt_src
|
||||
, libcxxabi
|
||||
, debugVersion ? false
|
||||
, enableSharedLibraries ? !stdenv.isDarwin
|
||||
}:
|
||||
|
||||
let
|
||||
src = fetch "llvm" "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy";
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "llvm-${version}";
|
||||
|
||||
unpackPhase = ''
|
||||
unpackFile ${src}
|
||||
mv llvm-${version}.src llvm
|
||||
sourceRoot=$PWD/llvm
|
||||
unpackFile ${compiler-rt_src}
|
||||
mv compiler-rt-* $sourceRoot/projects/compiler-rt
|
||||
'';
|
||||
|
||||
buildInputs = [ perl groff cmake libxml2 python2 libffi ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin libcxxabi;
|
||||
|
||||
propagatedBuildInputs = [ ncurses zlib ];
|
||||
|
||||
# The goal here is to disable LLVM bindings (currently go and ocaml) regardless
|
||||
# of whether the impure CMake search sheananigans find the compilers in global
|
||||
# paths. This mostly exists because sandbox builds don't work very well on Darwin
|
||||
# and sometimes you get weird behavior if CMake finds go in your system path.
|
||||
# This would be far prettier if there were a CMake option to just disable bindings
|
||||
# but from what I can tell, there isn't such a thing. The file in question only
|
||||
# contains `if(WIN32)` conditions to check whether to disable bindings, so making
|
||||
# those always succeed has the net effect of disabling all bindings.
|
||||
prePatch = ''
|
||||
substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
|
||||
''
|
||||
+ stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
(
|
||||
cd projects/compiler-rt
|
||||
patch -p1 < ${
|
||||
fetchpatch {
|
||||
name = "sigaltstack.patch"; # for glibc-2.26
|
||||
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
|
||||
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
|
||||
}
|
||||
}
|
||||
)
|
||||
'';
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
preBuild = ''
|
||||
mkdir -p $out/
|
||||
ln -sv $PWD/lib $out
|
||||
'';
|
||||
|
||||
patches = stdenv.lib.optionals (!stdenv.isDarwin) [
|
||||
# llvm-config --libfiles returns (non-existing) static libs
|
||||
../fix-llvm-config.patch
|
||||
];
|
||||
|
||||
cmakeFlags = with stdenv; [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_ENABLE_RTTI=ON"
|
||||
] ++ stdenv.lib.optional enableSharedLibraries
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
++ stdenv.lib.optional (!isDarwin)
|
||||
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||
++ stdenv.lib.optionals ( isDarwin) [
|
||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||
"-DCAN_TARGET_i386=false"
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-lpthread"; # no idea what's the problem
|
||||
|
||||
postBuild = ''
|
||||
rm -fR $out
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.src = src;
|
||||
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.ncsa;
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
with stdenv.lib; stdenv.mkDerivation rec {
|
||||
name = "mkcl-${version}";
|
||||
version = "1.1.10.2017-11-14";
|
||||
version = "1.1.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jcbeaudoin";
|
||||
repo = "mkcl";
|
||||
rev = "d3f5afe945907153db2be5a17a419966f83d7653";
|
||||
sha256 = "1jfmnh96b5dy1874a9y843vihd14ya4by46rb4h5izldp6x3j3kl";
|
||||
rev = "v${version}";
|
||||
sha256 = "0i2bfkda20lfypis6i4m7srfz6miyf66d8knp693d6sms73m2l26";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -17,11 +17,11 @@ let
|
||||
llvmShared = llvm_7.override { enableSharedLibraries = true; };
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "rustc";
|
||||
version = "1.34.0";
|
||||
version = "1.34.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
|
||||
sha256 = "0n8z1wngkxab1rvixqg6w8b727hzpnm9wp9h8iy3mpbrzp7mmj3s";
|
||||
sha256 = "0mig0prkmlnpbba1cmi17vlsl88ikv5pi26zjy2kcr64l62lm6n6";
|
||||
};
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake
|
||||
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, ncurses, python2
|
||||
, z3Support ? true, z3 ? null
|
||||
}:
|
||||
|
||||
@@ -6,14 +6,15 @@ assert z3Support -> z3 != null;
|
||||
assert z3Support -> stdenv.lib.versionAtLeast z3.version "4.6.0";
|
||||
|
||||
let
|
||||
version = "0.5.7";
|
||||
rev = "6da8b019e4a155d1f70abe7a3acc0f9765480a9e";
|
||||
sha256 = "0ii868r0ra6brjnn453kxqvw76p4bwjbvdyqfcn6v1bl2h4s60ir";
|
||||
version = "0.5.8";
|
||||
rev = "23d335f28e4055e67c3b22466ac7c4e41dc48344";
|
||||
sha256 = "10fa4qwfr3gfvxkzzjfs0w2fyij67cczklpj2x5hghcg08amkq37";
|
||||
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz;
|
||||
jsoncpp = fetchzip {
|
||||
url = jsoncppURL;
|
||||
sha256 = "1z0gj7a6jypkijmpknis04qybs1hkd04d1arr3gy89lnxmp6qzlm";
|
||||
};
|
||||
buildSharedLibs = stdenv.hostPlatform.isLinux;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "solc-${version}";
|
||||
@@ -24,9 +25,7 @@ stdenv.mkDerivation {
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./patches/shared-libs-install.patch
|
||||
];
|
||||
patches = stdenv.lib.optionals buildSharedLibs [ ./patches/shared-libs-install.patch ];
|
||||
|
||||
postPatch = ''
|
||||
touch prerelease.txt
|
||||
@@ -37,18 +36,41 @@ stdenv.mkDerivation {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBoost_USE_STATIC_LIBS=OFF"
|
||||
] ++ stdenv.lib.optionals buildSharedLibs [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
] ++ stdenv.lib.optionals (!z3Support) [
|
||||
"-DUSE_Z3=OFF"
|
||||
];
|
||||
|
||||
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
checkPhase = "LD_LIBRARY_PATH=./libsolc:./libsolidity:./libevmasm:./libdevcore:./libyul:./liblangutil:./test/tools/yulInterpreter:$LD_LIBRARY_PATH " +
|
||||
"./test/soltest -p true -- --no-ipc --no-smt --testpath ../test";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ boost ]
|
||||
++ stdenv.lib.optionals z3Support [ z3 ];
|
||||
buildInputs = [ boost ] ++ stdenv.lib.optionals z3Support [ z3 ];
|
||||
checkInputs = [ ncurses python2 ];
|
||||
|
||||
# Test fails on darwin for unclear reason
|
||||
doCheck = stdenv.hostPlatform.isLinux;
|
||||
|
||||
checkPhase = ''
|
||||
while IFS= read -r -d ''' dir
|
||||
do
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$dir
|
||||
export LD_LIBRARY_PATH
|
||||
done < <(find . -type d -print0)
|
||||
|
||||
pushd ..
|
||||
# IPC tests need aleth avaliable, so we disable it
|
||||
sed -i "s/IPC_ENABLED=true/IPC_ENABLED=false\nIPC_FLAGS=\"--no-ipc\"/" ./scripts/tests.sh
|
||||
for i in ./scripts/*.sh; do
|
||||
patchShebangs "$i"
|
||||
done
|
||||
for i in ./scripts/*.py; do
|
||||
patchShebangs "$i"
|
||||
done
|
||||
for i in ./test/*.sh; do
|
||||
patchShebangs "$i"
|
||||
done
|
||||
TERM=xterm ./scripts/tests.sh
|
||||
popd
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -57,7 +79,7 @@ stdenv.mkDerivation {
|
||||
homepage = https://github.com/ethereum/solidity;
|
||||
license = licenses.gpl3;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ dbrock akru lionello ];
|
||||
maintainers = with maintainers; [ dbrock akru lionello sifmelcara ];
|
||||
inherit version;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
--- souper-1be75fe6a96993b57dcba038798fe6d1c7d113eb-src/CMakeLists.txt.orig 2017-01-20 13:55:14.783632588 -0600
|
||||
+++ souper-1be75fe6a96993b57dcba038798fe6d1c7d113eb-src/CMakeLists.txt 2017-01-20 13:55:20.505728456 -0600
|
||||
@@ -33,7 +33,10 @@
|
||||
OUTPUT_VARIABLE LLVM_SYSTEM_LIBS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
-set(LLVM_LIBS "${LLVM_LIBS} ${LLVM_SYSTEM_LIBS}")
|
||||
+
|
||||
+if (LLVM_SYSTEM_LIBS)
|
||||
+ set(LLVM_LIBS "${LLVM_LIBS} ${LLVM_SYSTEM_LIBS}")
|
||||
+endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${LLVM_CONFIG_EXECUTABLE} --ldflags
|
||||
@@ -1,59 +0,0 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, makeWrapper
|
||||
, llvmPackages_4, hiredis, z3, gtest
|
||||
}:
|
||||
|
||||
let
|
||||
klee = fetchFromGitHub {
|
||||
owner = "rsas";
|
||||
repo = "klee";
|
||||
rev = "57cd3d43056b029d9da3c6b3c666c4153554c04f";
|
||||
sha256 = "197wb7nbirlfpx2jr3afpjjhcj7slc4dxxi02j3kmazz9kcqaygz";
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "souper-unstable-${version}";
|
||||
version = "2017-03-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "souper";
|
||||
rev = "cf2911d2eb1e7c8ab465df5a722fa5cdac06e6fc";
|
||||
sha256 = "1kg08a1af4di729pn1pip2lzqzlvjign6av95214f5rr3cq2q0cl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
llvmPackages_4.llvm
|
||||
llvmPackages_4.clang-unwrapped
|
||||
hiredis
|
||||
gtest
|
||||
];
|
||||
|
||||
patches = [ ./cmake-fix.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
mkdir -pv third_party
|
||||
cp -R "${klee}" third_party/klee
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/bin
|
||||
cp -v ./souper $out/bin/
|
||||
cp -v ./clang-souper $out/bin/
|
||||
wrapProgram "$out/bin/souper" \
|
||||
--add-flags "-z3-path=\"${z3}/bin/z3\""
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A superoptimizer for LLVM IR";
|
||||
homepage = "https://github.com/google/souper";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ taktoa ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
@@ -37,26 +37,20 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/lib
|
||||
cp -v release/lib/terra.so $out/lib
|
||||
|
||||
mkdir -pv $bin/bin
|
||||
cp -v release/bin/terra $bin/bin
|
||||
|
||||
mkdir -pv $static/lib
|
||||
cp -v release/lib/libterra.a $static/lib
|
||||
install -Dm755 -t $bin/bin release/bin/terra
|
||||
install -Dm755 -t $out/lib release/lib/terra${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
install -Dm644 -t $static/lib release/lib/libterra.a
|
||||
|
||||
mkdir -pv $dev/include
|
||||
cp -rv release/include/terra $dev/include
|
||||
''
|
||||
;
|
||||
'';
|
||||
|
||||
buildInputs = with llvmPackages; [ lua llvm clang-unwrapped ncurses ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "A low-level counterpart to Lua";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
homepage = http://terralang.org/;
|
||||
platforms = platforms.x86_64;
|
||||
maintainers = with maintainers; [ jb55 ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
|
||||
@@ -1,37 +1,46 @@
|
||||
{ fetchFromGitHub, fetchpatch, stdenv, makeWrapper, unzip, libxml2, m4, uthash }:
|
||||
{ fetchFromGitHub, stdenv, makeWrapper, unzip, libxml2, m4, uthash, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "z88dk-${version}";
|
||||
version = "20180217";
|
||||
rev = "49a7c6032b2675af742f5b0b3aa5bd5260bdd814";
|
||||
short_rev = "${builtins.substring 0 7 rev}";
|
||||
pname = "z88dk";
|
||||
version = "unstable-2019-05-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "z88dk";
|
||||
repo = "z88dk";
|
||||
inherit rev;
|
||||
sha256 = "00vbklh6lkq1gyd08ig2vcg6c1mghvlwfx3vq3wldf34hcs3k4pp";
|
||||
rev = "826d68632c3a7c17df88dd2ec54571a6041da69c";
|
||||
sha256 = "104qgb01sdb97mkcxnq1cdlqi5qvjm4rd9bg5r42pdfz81ss49xj";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# https://github.com/z88dk/z88dk/pull/612
|
||||
patches = [(fetchpatch {
|
||||
url = "https://github.com/Mic92/z88dk/commit/5b4ca132fa1f31c9ac48cf2220358715739ca0b2.patch";
|
||||
sha256 = "1p2l31j68p7jzykhkhd9iagn2lr08hdclk3cl9l32p1q6ghdipfv";
|
||||
})];
|
||||
|
||||
postPatch = ''
|
||||
# we dont rely on build.sh :
|
||||
export PATH="$PWD/bin:$PATH" # needed to have zcc in testsuite
|
||||
export ZCCCFG=$PWD/lib/config/
|
||||
# we don't want to build zsdcc since it required network (svn)
|
||||
# we test in checkPhase
|
||||
substituteInPlace Makefile \
|
||||
--replace 'testsuite bin/z88dk-lib$(EXESUFFIX)' 'bin/z88dk-lib$(EXESUFFIX)'\
|
||||
--replace 'ALL_EXT = bin/zsdcc$(EXESUFFIX)' 'ALL_EXT ='
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
make testsuite
|
||||
'';
|
||||
#failed on Issue_1105_function_pointer_calls
|
||||
doCheck = stdenv.hostPlatform.system != "aarch64-linux";
|
||||
|
||||
#_FORTIFY_SOURCE requires compiling with optimization (-O)
|
||||
NIX_CFLAGS_COMPILE = "-O";
|
||||
|
||||
short_rev = "${builtins.substring 0 7 src.rev}";
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"git_rev=${short_rev}"
|
||||
"version=${version}"
|
||||
"prefix=$(out)"
|
||||
"git_count=0"
|
||||
];
|
||||
nativeBuildInputs = [ makeWrapper unzip ];
|
||||
|
||||
nativeBuildInputs = [ which makeWrapper unzip ];
|
||||
buildInputs = [ libxml2 m4 uthash ];
|
||||
|
||||
preInstall = ''
|
||||
@@ -41,10 +50,10 @@ stdenv.mkDerivation rec {
|
||||
installTargets = "libs install";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://www.z88dk.org;
|
||||
homepage = "https://www.z88dk.org";
|
||||
description = "z80 Development Kit";
|
||||
license = licenses.clArtistic;
|
||||
maintainers = [ maintainers.genesis ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user