mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge branch 'new-darwin-stdenv' of git://github.com/gridaphobe/nixpkgs
refs #6122
This commit is contained in:
commit
5ac0318332
40 changed files with 1083 additions and 348 deletions
|
@ -31,10 +31,6 @@ let inherit (args.composableDerivation) composableDerivation edf;
|
|||
'';
|
||||
in
|
||||
composableDerivation {
|
||||
# use gccApple to compile on darwin
|
||||
mkDerivation = ( if stdenv.isDarwin
|
||||
then stdenvAdapters.overrideCC stdenv gccApple
|
||||
else stdenv ).mkDerivation;
|
||||
} (fix: {
|
||||
|
||||
name = "vim_configurable-7.4.516";
|
||||
|
|
|
@ -6,10 +6,6 @@ in
|
|||
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
# use gccApple to compile on darwin
|
||||
mkDerivation = ( if stdenv.isDarwin
|
||||
then stdenvAdapters.overrideCC stdenv gccApple
|
||||
else stdenv ).mkDerivation;
|
||||
} (fix: {
|
||||
|
||||
name = "qvim-7.4." + tag;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
, cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell
|
||||
, zlib ? null, extraPackages ? []
|
||||
, setupHook ? ./setup-hook.sh
|
||||
, libcxx ? null, libcxxabi ? null
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
@ -35,7 +34,7 @@ stdenv.mkDerivation {
|
|||
|
||||
preferLocalBuild = true;
|
||||
|
||||
inherit cc shell libcxx libcxxabi;
|
||||
inherit cc shell;
|
||||
libc = if nativeLibc then null else libc;
|
||||
binutils = if nativeTools then null else binutils;
|
||||
# The wrapper scripts use 'cat', so we may need coreutils.
|
||||
|
@ -88,7 +87,7 @@ stdenv.mkDerivation {
|
|||
''
|
||||
|
||||
+ (if nativeTools then ''
|
||||
ccPath="${nativePrefix}/bin"
|
||||
ccPath="${if stdenv.isDarwin then cc else nativePrefix}/bin"
|
||||
ldPath="${nativePrefix}/bin"
|
||||
'' else ''
|
||||
echo $cc > $out/nix-support/orig-cc
|
||||
|
|
22
pkgs/development/compilers/llvm/3.5/clang-purity.patch
Normal file
22
pkgs/development/compilers/llvm/3.5/clang-purity.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
|
||||
index 198e82e..810d006 100644
|
||||
--- a/lib/Driver/Tools.cpp
|
||||
+++ b/lib/Driver/Tools.cpp
|
||||
@@ -7355,17 +7355,6 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
CmdArgs.push_back("-shared");
|
||||
}
|
||||
|
||||
- if (ToolChain.getArch() == llvm::Triple::arm ||
|
||||
- ToolChain.getArch() == llvm::Triple::armeb ||
|
||||
- ToolChain.getArch() == llvm::Triple::thumb ||
|
||||
- ToolChain.getArch() == 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());
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
diff -Naur clang-3.4-orig/tools/extra/CMakeLists.txt clang-3.4/tools/extra/CMakeLists.txt
|
||||
--- clang-3.4-orig/tools/extra/CMakeLists.txt 2013-11-07 19:08:23.000000000 -0500
|
||||
+++ clang-3.4/tools/extra/CMakeLists.txt 2014-01-20 11:47:22.678435223 -0500
|
||||
@@ -1,3 +1,4 @@
|
||||
+include(CheckLibraryExists)
|
||||
check_library_exists(edit el_init "" HAVE_LIBEDIT)
|
||||
|
||||
add_subdirectory(clang-apply-replacements)
|
41
pkgs/development/compilers/llvm/3.5/clang.nix
Normal file
41
pkgs/development/compilers/llvm/3.5/clang.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "clang-${version}";
|
||||
|
||||
unpackPhase = ''
|
||||
unpackFile ${fetch "cfe" "12yv3jwdjcbkrx7zjm8wh4jrvb59v8fdw4mnmz3zc1jb00p9k07w"}
|
||||
mv cfe-${version}.src clang
|
||||
sourceRoot=$PWD/clang
|
||||
unpackFile ${clang-tools-extra_src}
|
||||
mv clang-tools-extra-* $sourceRoot/tools/extra
|
||||
'';
|
||||
|
||||
buildInputs = [ cmake libedit libxml2 llvm ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
] ++
|
||||
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");
|
||||
|
||||
patches = [ ./clang-purity.patch ];
|
||||
|
||||
# Clang expects to find LLVMgold in its own prefix
|
||||
# Clang expects to find sanitizer libraries in its own prefix
|
||||
postInstall = ''
|
||||
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
|
||||
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
|
||||
ln -sv $out/bin/clang $out/bin/cpp
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
41
pkgs/development/compilers/llvm/3.5/default.nix
Normal file
41
pkgs/development/compilers/llvm/3.5/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ pkgs, newScope, stdenv, isl, fetchurl }:
|
||||
let
|
||||
callPackage = newScope (self // { inherit stdenv isl version fetch; });
|
||||
|
||||
version = "3.5.0";
|
||||
|
||||
fetch = fetch_v version;
|
||||
fetch_v = ver: name: sha256: fetchurl {
|
||||
url = "http://llvm.org/releases/${ver}/${name}-${ver}.src.tar.xz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
compiler-rt_src = fetch "compiler-rt" "0dl1kbrhz96djsxqr61iw5h788s7ncfpfb7aayixky1bhdaydcx4";
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "0s8zjgxg8bj15nnqcw1cj1zffcralhh7f0gda1famddgg2rvx099";
|
||||
|
||||
self = {
|
||||
llvm = callPackage ./llvm.nix rec {
|
||||
version = "3.5.0";
|
||||
fetch = fetch_v version;
|
||||
inherit compiler-rt_src;
|
||||
};
|
||||
|
||||
clang = callPackage ./clang.nix rec {
|
||||
version = "3.5.0";
|
||||
fetch = fetch_v version;
|
||||
inherit clang-tools-extra_src;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld.nix {};
|
||||
|
||||
lldb = callPackage ./lldb.nix {};
|
||||
|
||||
polly = callPackage ./polly.nix {};
|
||||
|
||||
dragonegg = callPackage ./dragonegg.nix {};
|
||||
|
||||
libcxx = callPackage ./libc++ { stdenv = pkgs.clangStdenv; };
|
||||
|
||||
libcxxabi = callPackage ./libc++abi { stdenv = pkgs.clangStdenv; };
|
||||
};
|
||||
in self
|
34
pkgs/development/compilers/llvm/3.5/dragonegg.nix
Normal file
34
pkgs/development/compilers/llvm/3.5/dragonegg.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{stdenv, fetch, fetchpatch, llvm, gmp, mpfr, libmpc, ncurses, zlib, version}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dragonegg-${version}";
|
||||
|
||||
src = fetch "dragonegg" "1733czbvby1ww3xkwcwmm0km0bpwhfyxvf56wb0zv5gksp3kbgrr";
|
||||
|
||||
patches = [(fetchpatch {
|
||||
url = "https://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/ABIHack.inc"
|
||||
+ "?r1=208730&r2=208729&view=patch";
|
||||
sha256 = "1al82gqz90hzjx24p0wls029lw2bgnlgd209kgvxsp82p4z1v1c1";
|
||||
name = "bug-18548.patch";
|
||||
})];
|
||||
patchFlags = "-p2";
|
||||
|
||||
# The gcc the plugin will be built for (the same used building dragonegg)
|
||||
GCC = "gcc";
|
||||
|
||||
buildInputs = [ llvm gmp mpfr libmpc ncurses zlib ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/share/doc/${name}
|
||||
cp -d dragonegg.so $out/lib
|
||||
cp README COPYING $out/share/doc/${name}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://dragonegg.llvm.org/;
|
||||
description = "gcc plugin that replaces gcc's optimizers and code generators by those in LLVM";
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
maintainers = with stdenv.lib.maintainers; [viric shlevy];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
|
@ -1,15 +1,25 @@
|
|||
{ lib, stdenv, fetchurl, cmake, libcxxabi, fixDarwinDylibNames }:
|
||||
|
||||
let version = "3.4.2"; in
|
||||
let version = "3.5.0"; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libc++-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://llvm.org/releases/${version}/libcxx-${version}.src.tar.gz";
|
||||
sha256 = "0z3jdvgcq995khkpis5c5vaxhbmvbqjlalbhn09k6pgb5zp46rc2";
|
||||
url = "http://llvm.org/releases/${version}/libcxx-${version}.src.tar.xz";
|
||||
sha256 = "1h5is2jd802344kddm45jcm7bra51llsiv9r34h0rrb3ba2dlic0";
|
||||
};
|
||||
|
||||
# instead of allowing libc++ to link with /usr/lib/libc++abi.dylib,
|
||||
# force it to link with our copy
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace lib/CMakeLists.txt \
|
||||
--replace 'OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib' \
|
||||
'OSX_RE_EXPORT_LINE "${libcxxabi}/lib/libc++abi.dylib' \
|
||||
--replace '"''${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib"' \
|
||||
'"${libcxxabi}/lib/libc++abi.dylib"'
|
||||
'';
|
||||
|
||||
patches = [ ./darwin.patch ];
|
||||
|
||||
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
@ -26,9 +36,6 @@ stdenv.mkDerivation rec {
|
|||
|
||||
inherit libcxxabi;
|
||||
|
||||
# Remove a Makefile that causes many retained dependencies.
|
||||
postInstall = "rm $out/include/c++/v1/Makefile";
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
53
pkgs/development/compilers/llvm/3.5/libc++abi/default.nix
Normal file
53
pkgs/development/compilers/llvm/3.5/libc++abi/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ stdenv, cmake, coreutils, fetchurl, libcxx, libunwind, llvm }:
|
||||
|
||||
let version = "3.5.0"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libc++abi-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://llvm.org/releases/${version}/libcxxabi-${version}.src.tar.xz";
|
||||
sha256 = "1ndcpw3gfrzh7m1jac2qadhkrqgvb65cns69j9niydyj5mmbxijk";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_LINK = "-L${libunwind}/lib";
|
||||
|
||||
buildInputs = [ coreutils cmake llvm ];
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxx.src}
|
||||
export NIX_CFLAGS_COMPILE+=" -I${libunwind}/include -I$PWD/include"
|
||||
export cmakeFlags="-DLIBCXXABI_LIBCXX_INCLUDES=$(${coreutils}/bin/readlink -f libcxx-*)/include"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
'';
|
||||
|
||||
installPhase = if stdenv.isDarwin
|
||||
then ''
|
||||
for file in lib/*; 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/cxxabi.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 = "BSD";
|
||||
maintainers = with stdenv.lib.maintainers; [ shlevy vlstill ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
31
pkgs/development/compilers/llvm/3.5/lld.nix
Normal file
31
pkgs/development/compilers/llvm/3.5/lld.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, fetch, cmake, llvm, ncurses, zlib, python, version }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "lld-${version}";
|
||||
|
||||
src = fetch "lld" "1sd4scqynryfrmcc4h0ljgwn2dgjmbbmf38z50ya6l0janpd2nxx";
|
||||
|
||||
preUnpack = ''
|
||||
# !!! Hopefully won't be needed for 3.5
|
||||
unpackFile ${llvm.src}
|
||||
export cmakeFlags="$cmakeFlags -DLLD_PATH_TO_LLVM_SOURCE="`ls -d $PWD/llvm-*`
|
||||
'';
|
||||
|
||||
buildInputs = [ cmake ncurses zlib python ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
"-DLLD_PATH_TO_LLVM_BUILD=${llvm}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A set of modular code for creating linker tools";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
44
pkgs/development/compilers/llvm/3.5/lldb.nix
Normal file
44
pkgs/development/compilers/llvm/3.5/lldb.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, zlib
|
||||
, ncurses
|
||||
, swig
|
||||
, which
|
||||
, libedit
|
||||
, llvm
|
||||
, clang
|
||||
, python
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "lldb-${version}";
|
||||
|
||||
src = fetch "lldb" "0h8cmjrhjhigk7k2qll1pcf6jfgmbdzkzfz2i048pkfg851s0x44";
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's|/usr/bin/env||' \
|
||||
scripts/Python/finish-swig-Python-LLDB.sh \
|
||||
scripts/Python/build-swig-Python.sh
|
||||
'';
|
||||
|
||||
buildInputs = [ cmake python which swig ncurses zlib libedit ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
|
||||
"-DLLDB_PATH_TO_CLANG_BUILD=${clang}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A next-generation high-performance debugger";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
diff -Naur llvm-3.4-orig/cmake/modules/TableGen.cmake llvm-3.4/cmake/modules/TableGen.cmake
|
||||
--- llvm-3.4-orig/cmake/modules/TableGen.cmake 2013-10-06 21:00:07.000000000 -0400
|
||||
+++ llvm-3.4/cmake/modules/TableGen.cmake 2014-01-20 13:06:55.273022149 -0500
|
||||
@@ -78,8 +78,6 @@
|
||||
endif()
|
||||
|
||||
macro(add_tablegen target project)
|
||||
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
|
||||
-
|
||||
set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
|
||||
set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
|
||||
add_llvm_utility(${target} ${ARGN})
|
70
pkgs/development/compilers/llvm/3.5/llvm.nix
Normal file
70
pkgs/development/compilers/llvm/3.5/llvm.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ stdenv
|
||||
, fetch
|
||||
, perl
|
||||
, groff
|
||||
, cmake
|
||||
, python
|
||||
, libffi
|
||||
, binutils
|
||||
, libxml2
|
||||
, valgrind
|
||||
, ncurses
|
||||
, version
|
||||
, zlib
|
||||
, compiler-rt_src
|
||||
}:
|
||||
|
||||
let
|
||||
src = fetch "llvm" "00swb43mzlvda8306arlg2jw7g6k3acwfccgf1k4c2pgd3rrkq98";
|
||||
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 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;
|
||||
|
||||
propagatedBuildInputs = [ ncurses zlib ];
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
preBuild = ''
|
||||
mkdir -p $out/
|
||||
ln -sv $PWD/lib $out
|
||||
'';
|
||||
|
||||
cmakeFlags = with stdenv; [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_BINUTILS_INCDIR=${binutils}/include"
|
||||
"-DCMAKE_CXX_FLAGS=-stdlib=libc++"
|
||||
] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON"
|
||||
++ stdenv.lib.optional ( isDarwin) "-DCAN_TARGET_i386=false";
|
||||
|
||||
postBuild = ''
|
||||
rm -fR $out
|
||||
|
||||
paxmark m bin/{lli,llvm-rtdyld}
|
||||
|
||||
paxmark m unittests/ExecutionEngine/JIT/JITTests
|
||||
paxmark m unittests/ExecutionEngine/MCJIT/MCJITTests
|
||||
paxmark m unittests/Support/SupportTests
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.src = src;
|
||||
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ shlevy lovek323 raskin viric ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
diff -Naur polly-3.4-orig/CMakeLists.txt polly-3.4/CMakeLists.txt
|
||||
--- polly-3.4-orig/CMakeLists.txt 2013-11-21 06:51:46.000000000 -0500
|
||||
+++ polly-3.4/CMakeLists.txt 2014-01-20 18:49:34.907919933 -0500
|
||||
@@ -53,7 +53,7 @@
|
||||
execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --cxxflags
|
||||
OUTPUT_VARIABLE LLVM_CXX_FLAGS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
- set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS})
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS}")
|
||||
endif(NOT DEFINED LLVM_MAIN_SRC_DIR)
|
||||
|
||||
set(POLLY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
27
pkgs/development/compilers/llvm/3.5/polly.nix
Normal file
27
pkgs/development/compilers/llvm/3.5/polly.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ stdenv, fetch, cmake, isl, python, gmp, llvm, version }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "polly-${version}";
|
||||
|
||||
src = fetch "polly" "1rqflmgzg1vzjm0r32c5ck8x3q0qm3g0hh8ggbjazh6x7nvmy6ll";
|
||||
|
||||
patches = [ ./polly-separate-build.patch ];
|
||||
|
||||
buildInputs = [ cmake isl python gmp ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
"-DLLVM_INSTALL_ROOT=${llvm}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A polyhedral optimizer for llvm";
|
||||
homepage = http://llvm.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
|
@ -66,6 +66,8 @@ stdenv.mkDerivation rec {
|
|||
${optionalString stdenv.isArm ''
|
||||
configureFlagsArray=(-Dldflags="-lm -lrt")
|
||||
''}
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" ""
|
||||
'';
|
||||
|
||||
preBuild = optionalString (!(stdenv ? cc && stdenv.cc.nativeTools))
|
||||
|
|
|
@ -12,6 +12,8 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
nativeBuildInputs = [ m4 ];
|
||||
|
||||
patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null;
|
||||
|
||||
configureFlags =
|
||||
# Build a "fat binary", with routines for several sub-architectures
|
||||
# (x86), except on Solaris where some tests crash with "Memory fault".
|
||||
|
|
18
pkgs/development/libraries/gmp/need-size-t.patch
Normal file
18
pkgs/development/libraries/gmp/need-size-t.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
diff --git a/gmp-h.in b/gmp-h.in
|
||||
index 7deb67a..240d663 100644
|
||||
--- a/gmp-h.in
|
||||
+++ b/gmp-h.in
|
||||
@@ -46,13 +46,11 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
|
||||
#ifndef __GNU_MP__
|
||||
#define __GNU_MP__ 5
|
||||
|
||||
-#define __need_size_t /* tell gcc stddef.h we only want size_t */
|
||||
#if defined (__cplusplus)
|
||||
#include <cstddef> /* for size_t */
|
||||
#else
|
||||
#include <stddef.h> /* for size_t */
|
||||
#endif
|
||||
-#undef __need_size_t
|
||||
|
||||
/* Instantiated by configure. */
|
||||
#if ! defined (__GMP_WITHIN_CONFIGURE)
|
|
@ -1,51 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, libcxx, coreutils, gnused }:
|
||||
|
||||
let rev = "199626"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libc++abi-${rev}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://tarballs.nixos.org/libcxxabi-${rev}.tar.bz2";
|
||||
sha256 = "09wr6qwgmdzbmgfkdzfhph9giy0zd6fp3s017fcfy4g0prjn5s4c";
|
||||
};
|
||||
|
||||
patches = [ ./no-stdc++.patch ./darwin.patch ];
|
||||
|
||||
buildInputs = [ coreutils ];
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxx.src}
|
||||
cp -r libcxx-*/include libcxxabi*/
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
# Hack: NIX_CFLAGS_COMPILE doesn't work here because clang++ isn't
|
||||
# wrapped at this point.
|
||||
export CXX="clang++ -D_LIBCXX_DYNAMIC_FALLBACK=1"
|
||||
unset SDKROOT
|
||||
'';
|
||||
|
||||
installPhase = if stdenv.isDarwin
|
||||
then ''
|
||||
install -d -m 755 $out/include $out/lib
|
||||
install -m 644 lib/libc++abi.dylib $out/lib
|
||||
install -m 644 include/cxxabi.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
|
||||
'';
|
||||
|
||||
buildPhase = "(cd lib; ./buildit)";
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxxabi.llvm.org/;
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = "BSD";
|
||||
maintainers = with stdenv.lib.maintainers; [ shlevy vlstill ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
17
pkgs/development/libraries/libunwind/native.nix
Normal file
17
pkgs/development/libraries/libunwind/native.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ stdenv }:
|
||||
|
||||
assert stdenv.isDarwin;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libunwind-native";
|
||||
|
||||
unpackPhase = ":";
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cat /usr/lib/system/libunwind.dylib > $out/lib/libunwind.dylib
|
||||
'';
|
||||
|
||||
meta.platforms = stdenv.lib.platforms.darwin;
|
||||
}
|
|
@ -1,9 +1,11 @@
|
|||
{ stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2, libarchive
|
||||
, useNcurses ? false, ncurses, useQt4 ? false, qt4
|
||||
, useNcurses ? false, ncurses, useQt4 ? false, qt4, wantPS ? false, ps ? null
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert wantPS -> (ps != null);
|
||||
|
||||
let
|
||||
os = stdenv.lib.optionalString;
|
||||
majorVersion = "2.8";
|
||||
|
@ -43,6 +45,8 @@ stdenv.mkDerivation rec {
|
|||
++ optional useNcurses ncurses
|
||||
++ optional useQt4 qt4;
|
||||
|
||||
propagatedBuildInputs = optional wantPS ps;
|
||||
|
||||
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
|
||||
|
||||
configureFlags =
|
||||
|
|
35
pkgs/os-specific/darwin/adv_cmds/ps.nix
Normal file
35
pkgs/os-specific/darwin/adv_cmds/ps.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ps-${version}";
|
||||
version = "153";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://opensource.apple.com/tarballs/adv_cmds/adv_cmds-${version}.tar.gz";
|
||||
sha256 = "174v6a4zkcm2pafzgdm6kvs48z5f911zl7k49hv7kjq6gm58w99v";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
cd ps
|
||||
cc -Os -Wall -I. -c -o fmt.o fmt.c
|
||||
cc -Os -Wall -I. -c -o keyword.o keyword.c
|
||||
cc -Os -Wall -I. -c -o nlist.o nlist.c
|
||||
cc -Os -Wall -I. -c -o print.o print.c
|
||||
cc -Os -Wall -I. -c -o ps.o ps.c
|
||||
cc -Os -Wall -I. -c -o tasks.o tasks.c
|
||||
cc -o ps fmt.o keyword.o nlist.o print.o ps.o tasks.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/man/man1
|
||||
|
||||
cp ps $out/bin/ps
|
||||
cp ps.1 $out/share/man/man1
|
||||
'';
|
||||
|
||||
|
||||
meta = {
|
||||
platforms = stdenv.lib.platforms.darwin;
|
||||
maintainers = with stdenv.lib.maintainers; [ gridaphobe ];
|
||||
};
|
||||
}
|
46
pkgs/os-specific/darwin/bootstrap-cmds/default.nix
Normal file
46
pkgs/os-specific/darwin/bootstrap-cmds/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ stdenv, fetchurl, flex, yacc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "86";
|
||||
name = "bootstrap_cmds-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.opensource.apple.com/tarballs/bootstrap_cmds/${name}.tar.gz";
|
||||
sha256 = "0xr0296jm1r3q7kbam98h85g23qlfi763z54ahj563n636kyk2wb";
|
||||
};
|
||||
|
||||
buildInputs = [ flex yacc ];
|
||||
|
||||
buildPhase = ''
|
||||
cd migcom.tproj
|
||||
yacc -d parser.y
|
||||
flex --header-file=lexxer.yy.h -o lexxer.yy.c lexxer.l
|
||||
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o error.o error.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o global.o global.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o handler.o header.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o header.o header.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o mig.o mig.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o routine.o routine.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o server.o server.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o statement.o statement.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o string.o string.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o type.o type.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o user.o user.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o utils.o utils.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o lexxer.yy.o lexxer.yy.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o y.tab.o y.tab.c
|
||||
|
||||
cc -dead_strip -o migcom error.o global.o header.o mig.o routine.o server.o statement.o string.o type.o user.o utils.o lexxer.yy.o y.tab.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/libexec $out/share/man/man1
|
||||
|
||||
chmod +x mig.sh
|
||||
cp mig.sh $out/bin/mig
|
||||
cp migcom $out/libexec
|
||||
cp mig.1 $out/share/man/man1
|
||||
cp migcom.1 $out/share/man/man1
|
||||
'';
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
{ stdenv, cross, fetchurl, autoconf, automake, libtool
|
||||
, libcxx, llvm, clang, openssl, libuuid
|
||||
, maloader, makeWrapper, xctoolchain
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cctools-port-${version}";
|
||||
version = "845";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/tpoechtrager/cctools-port/archive/"
|
||||
+ "cctools-${version}-ld64-136-1.tar.gz";
|
||||
sha256 = "06pg6h1g8avgx4j6cfykdpggf490li796gzhhyqn27jsagli307i";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
autoconf automake libtool libcxx llvm clang openssl libuuid makeWrapper
|
||||
];
|
||||
|
||||
patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tools
|
||||
sed -i -e 's/which/type -P/' tools/*.sh
|
||||
sed -i -e 's|clang++|& -I${libcxx}/include/c++/v1|' cctools/autogen.sh
|
||||
|
||||
# Workaround for https://www.sourceware.org/bugzilla/show_bug.cgi?id=11157
|
||||
cat > cctools/include/unistd.h <<EOF
|
||||
#ifdef __block
|
||||
# undef __block
|
||||
# include_next "unistd.h"
|
||||
# define __block __attribute__((__blocks__(byref)))
|
||||
#else
|
||||
# include_next "unistd.h"
|
||||
#endif
|
||||
EOF
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd cctools
|
||||
sh autogen.sh
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"CXXFLAGS=-I${libcxx}/include/c++/v1"
|
||||
"--target=${cross.config}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
for tool in dyldinfo dwarfdump dsymutil; do
|
||||
makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${cross.config}-$tool" \
|
||||
--add-flags "${xctoolchain}/bin/$tool"
|
||||
ln -s "$out/bin/${cross.config}-$tool" "$out/bin/$tool"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.opensource.apple.com/source/cctools/";
|
||||
description = "Mac OS X Compiler Tools (cross-platform port)";
|
||||
license = stdenv.lib.licenses.apsl20;
|
||||
};
|
||||
}
|
122
pkgs/os-specific/darwin/cctools/darwin.patch
Normal file
122
pkgs/os-specific/darwin/cctools/darwin.patch
Normal file
|
@ -0,0 +1,122 @@
|
|||
From b6001ddb935351b4d150546ddab6d25eae05afaa Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Peebles <pumpkin@me.com>
|
||||
Date: Sun, 12 Oct 2014 12:23:51 -0400
|
||||
Subject: [PATCH] work
|
||||
|
||||
---
|
||||
cctools/Makefile.am | 2 +-
|
||||
cctools/configure.ac | 2 --
|
||||
cctools/ld64/src/3rd/helper.c | 2 ++
|
||||
cctools/ld64/src/3rd/strlcat.c | 2 ++
|
||||
cctools/ld64/src/3rd/strlcpy.c | 3 ++-
|
||||
cctools/ld64/src/ld/Options.cpp | 2 ++
|
||||
tools/find_lto_header.sh | 2 +-
|
||||
7 files changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/cctools/Makefile.am b/cctools/Makefile.am
|
||||
index 44084ad..34a670c 100644
|
||||
--- a/cctools/Makefile.am
|
||||
+++ b/cctools/Makefile.am
|
||||
@@ -1,2 +1,2 @@
|
||||
-SUBDIRS=libstuff ar as misc libobjc2 otool ld64 $(LD_CLASSIC)
|
||||
+SUBDIRS=libstuff ar as misc ld64 $(LD_CLASSIC)
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
diff --git a/cctools/configure.ac b/cctools/configure.ac
|
||||
index c4f6c47..b641925 100644
|
||||
--- a/cctools/configure.ac
|
||||
+++ b/cctools/configure.ac
|
||||
@@ -278,8 +278,6 @@ AC_CONFIG_FILES([as/ppc/Makefile])
|
||||
AC_CONFIG_FILES([as/ppc64/Makefile])
|
||||
#AC_CONFIG_FILES([man/Makefile])
|
||||
AC_CONFIG_FILES([misc/Makefile])
|
||||
-AC_CONFIG_FILES([otool/Makefile])
|
||||
-AC_CONFIG_FILES([libobjc2/Makefile])
|
||||
AC_CONFIG_FILES([ld/Makefile])
|
||||
|
||||
|
||||
diff --git a/cctools/ld64/src/3rd/helper.c b/cctools/ld64/src/3rd/helper.c
|
||||
index 19f4be7..bec6869 100644
|
||||
--- a/cctools/ld64/src/3rd/helper.c
|
||||
+++ b/cctools/ld64/src/3rd/helper.c
|
||||
@@ -23,6 +23,7 @@
|
||||
const char ldVersionString[] = "236.3\n";
|
||||
|
||||
|
||||
+#if 0
|
||||
void __assert_rtn(const char *func, const char *file, int line, const char *msg)
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
@@ -33,6 +34,7 @@ void __assert_rtn(const char *func, const char *file, int line, const char *msg)
|
||||
__assert(msg, file, line);
|
||||
#endif /* __FreeBSD__ */
|
||||
}
|
||||
+#endif
|
||||
|
||||
int _NSGetExecutablePath(char *path, unsigned int *size)
|
||||
{
|
||||
diff --git a/cctools/ld64/src/3rd/strlcat.c b/cctools/ld64/src/3rd/strlcat.c
|
||||
index 500d038..dadf269 100644
|
||||
--- a/cctools/ld64/src/3rd/strlcat.c
|
||||
+++ b/cctools/ld64/src/3rd/strlcat.c
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
+#if 0
|
||||
size_t
|
||||
strlcat(char * restrict dst, const char * restrict src, size_t maxlen) {
|
||||
const size_t srclen = strlen(src);
|
||||
@@ -36,3 +37,4 @@ strlcat(char * restrict dst, const char * restrict src, size_t maxlen) {
|
||||
}
|
||||
return dstlen + srclen;
|
||||
}
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/cctools/ld64/src/3rd/strlcpy.c b/cctools/ld64/src/3rd/strlcpy.c
|
||||
index c69f107..34a399b 100644
|
||||
--- a/cctools/ld64/src/3rd/strlcpy.c
|
||||
+++ b/cctools/ld64/src/3rd/strlcpy.c
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
+#if 0
|
||||
size_t
|
||||
strlcpy(char * restrict dst, const char * restrict src, size_t maxlen) {
|
||||
const size_t srclen = strlen(src);
|
||||
@@ -34,4 +35,4 @@ strlcpy(char * restrict dst, const char * restrict src, size_t maxlen) {
|
||||
}
|
||||
return srclen;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp
|
||||
index 3a78df8..0ecf9f2 100644
|
||||
--- a/cctools/ld64/src/ld/Options.cpp
|
||||
+++ b/cctools/ld64/src/ld/Options.cpp
|
||||
@@ -49,6 +49,8 @@ namespace lto {
|
||||
extern const char* version();
|
||||
}
|
||||
|
||||
+#define __MAC_OS_X_VERSION_MIN_REQUIRED 1060
|
||||
+
|
||||
// magic to place command line in crash reports
|
||||
const int crashreporterBufferSize = 2000;
|
||||
static char crashreporterBuffer[crashreporterBufferSize];
|
||||
diff --git a/tools/find_lto_header.sh b/tools/find_lto_header.sh
|
||||
index aee3a4a..4733981 100755
|
||||
--- a/tools/find_lto_header.sh
|
||||
+++ b/tools/find_lto_header.sh
|
||||
@@ -14,7 +14,7 @@ function try()
|
||||
# Adding the include directory with -I causes the build to fail.
|
||||
ln -sf "$LLVM_INC_DIR/llvm-c/lto.h" "include/llvm-c/lto.h"
|
||||
mkdir -p tmp
|
||||
- echo -n "-Wl,-rpath,$LLVM_LIB_DIR,--enable-new-dtags -L$LLVM_LIB_DIR -lLTO " > tmp/ldflags
|
||||
+ echo -n "-Wl,-rpath,$LLVM_LIB_DIR -L$LLVM_LIB_DIR -lLTO " > tmp/ldflags
|
||||
echo -n "-DLTO_SUPPORT=1 " > tmp/cflags
|
||||
echo -n "-DLTO_SUPPORT=1 " > tmp/cxxflags
|
||||
echo -n "$LLVM_LIB_DIR" > tmp/ldpath
|
||||
--
|
||||
1.9.3 (Apple Git-50)
|
||||
|
80
pkgs/os-specific/darwin/cctools/port.nix
Normal file
80
pkgs/os-specific/darwin/cctools/port.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{ stdenv, fetchurl, autoconf, automake, libtool
|
||||
, llvm, libcxx, clang, openssl, libuuid
|
||||
}:
|
||||
|
||||
let
|
||||
baseParams = rec {
|
||||
name = "cctools-port-${version}";
|
||||
version = "855";
|
||||
|
||||
src = let
|
||||
# Should be fetchFromGitHub but it was whining so this will do for now
|
||||
owner = "tpoechtrager";
|
||||
repo = "cctools-port";
|
||||
rev = "7083dddbb0f106d791d313829ea7dc45db90e375";
|
||||
in fetchurl {
|
||||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||
sha256 = "017gxlcwgi7xhayjzj9w3fac175p2rm4vjzf9cycq9683m9pmyzj";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
autoconf automake libtool llvm clang openssl libuuid libcxx
|
||||
];
|
||||
|
||||
patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tools
|
||||
sed -i -e 's/which/type -P/' tools/*.sh
|
||||
|
||||
# Workaround for https://www.sourceware.org/bugzilla/show_bug.cgi?id=11157
|
||||
cat > cctools/include/unistd.h <<EOF
|
||||
#ifdef __block
|
||||
# undef __block
|
||||
# include_next "unistd.h"
|
||||
# define __block __attribute__((__blocks__(byref)))
|
||||
#else
|
||||
# include_next "unistd.h"
|
||||
#endif
|
||||
EOF
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd cctools
|
||||
sh autogen.sh
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.opensource.apple.com/source/cctools/";
|
||||
description = "Mac OS X Compiler Tools (cross-platform port)";
|
||||
license = stdenv.lib.licenses.apsl20;
|
||||
};
|
||||
};
|
||||
in {
|
||||
# Hacks that for the darwin stdenv (sad that we need write workarounds for what started as a darwin package)
|
||||
native = stdenv.mkDerivation (baseParams // {
|
||||
patches = baseParams.patches ++ [ ./darwin.patch ];
|
||||
|
||||
postInstall = ''
|
||||
cd $out/bin
|
||||
for tool in dwarfdump dsymutil; do
|
||||
ln -s /usr/bin/$tool
|
||||
done
|
||||
'';
|
||||
});
|
||||
|
||||
cross =
|
||||
{ cross, maloader, makeWrapper, xctoolchain}: stdenv.mkDerivation (baseParams // {
|
||||
configureFlags = baseParams.configureFlags ++ [ "--target=${cross.config}" ];
|
||||
|
||||
postInstall = ''
|
||||
for tool in dyldinfo dwarfdump dsymutil; do
|
||||
${makeWrapper}/bin/makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${cross.config}-$tool" \
|
||||
--add-flags "${xctoolchain}/bin/$tool"
|
||||
ln -s "$out/bin/${cross.config}-$tool" "$out/bin/$tool"
|
||||
done
|
||||
'';
|
||||
});
|
||||
}
|
|
@ -1,71 +1,43 @@
|
|||
{ stdenv, fetchadc, xar, gzip, cpio }:
|
||||
{ stdenv, fetchurl, xar, gzip, cpio }:
|
||||
|
||||
let
|
||||
name = "command-line-tools-mac-os-10.9";
|
||||
|
||||
pkg = { installPhase }: stdenv.mkDerivation {
|
||||
name = "${name}.pkg";
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
inherit installPhase;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Developer tools .pkg file";
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.unfree;
|
||||
};
|
||||
};
|
||||
|
||||
basic = pkg: stdenv.mkDerivation {
|
||||
pkg = { name, sha256 }: stdenv.mkDerivation {
|
||||
inherit name;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://swcdn.apple.com/content/downloads/00/14/031-07556/i7hoqm3awowxdy48l34uel4qvwhdq8lgam/${name}.pkg";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
buildInputs = [ xar gzip cpio ];
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
outputs = [ "sdk" "tools" ];
|
||||
|
||||
unpackPhase = ''
|
||||
${xar}/bin/xar -x -f "${pkg}"
|
||||
xar -x -f $src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
start="$(pwd)"
|
||||
mkdir -p $sdk
|
||||
mkdir -p $tools
|
||||
|
||||
cd $sdk
|
||||
cat $start/DevSDK_OSX109.pkg/Payload | ${gzip}/bin/gzip -d | ${cpio}/bin/cpio -idm
|
||||
|
||||
cd $tools
|
||||
cat $start/CLTools_Executables.pkg/Payload | ${gzip}/bin/gzip -d | ${cpio}/bin/cpio -idm
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
cat $start/Payload | gzip -d | cpio -idm
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Mac OS command-line developer tools and SDK";
|
||||
description = "Apple developer tools ${name}";
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.unfree;
|
||||
};
|
||||
};
|
||||
in rec {
|
||||
dmg = fetchadc {
|
||||
# Isn't this a beautiful path? Note the subtle differences before and after the slash!
|
||||
path = "Developer_Tools/command_line_tools_os_x_10.9_for_xcode__xcode_6/command_line_tools_for_os_x_10.9_for_xcode_6.dmg";
|
||||
sha256 = "0zrpf73r3kfk9pdh6p6j6w1sbw7s2pp0f8rd83660r5hk1y3j5jc";
|
||||
tools = pkg {
|
||||
name = "CLTools_Executables";
|
||||
sha256 = "1rqrgip9pwr9d6p1hkd027lzxpymr1qm54jjnkldjjb8m4nps7bp";
|
||||
};
|
||||
|
||||
pure = { xpwn }: basic (pkg {
|
||||
installPhase = ''
|
||||
${xpwn}/bin/hdutil ${dmg} extract "Command Line Tools (OS X 10.9).pkg" $out
|
||||
'';
|
||||
});
|
||||
|
||||
impure = basic (pkg {
|
||||
installPhase = ''
|
||||
/usr/bin/hdiutil attach ${dmg} -mountpoint clt-mount -nobrowse
|
||||
cp "clt-mount/Command Line Tools (OS X 10.9).pkg" $out
|
||||
/usr/bin/hdiutil unmount clt-mount
|
||||
'';
|
||||
});
|
||||
sdk = pkg {
|
||||
name = "DevSDK_OSX109";
|
||||
sha256 = "0x6r61h78r5cxk9dbw6fnjpn6ydi4kcajvllpczx3mi52crlkm4x";
|
||||
};
|
||||
}
|
||||
|
|
40
pkgs/os-specific/darwin/libc/default.nix
Normal file
40
pkgs/os-specific/darwin/libc/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ stdenv, fetchurl, fetchgit, fetchzip, perl, python }:
|
||||
|
||||
let
|
||||
osx_sdk = fetchgit {
|
||||
url = "https://github.com/samdmarshall/OSXPrivateSDK";
|
||||
rev = "refs/heads/master";
|
||||
sha256 = "04m71xhjyac42h7alxjsqsipq07hm85wibvm3h65dqafcbqkl1i1";
|
||||
};
|
||||
dispatch = fetchzip {
|
||||
url = "https://opensource.apple.com/tarballs/libdispatch/libdispatch-339.92.1.tar.gz";
|
||||
sha256 = "0faxm4r7lamz57m9pr72jwm0qiwcrcy5dsiff0g9qyfi10pnj5i4";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "825.40.1";
|
||||
name = "libc-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://opensource.apple.com/tarballs/Libc/Libc-${version}.tar.gz";
|
||||
sha256 = "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf";
|
||||
};
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
patches = [ ./fileport.patch ];
|
||||
|
||||
configurePhase = ''
|
||||
mkdir -p scratch
|
||||
mkdir -p scratch/System/sys
|
||||
ln -sv ${osx_sdk}/System/Library/Frameworks/System.framework/PrivateHeaders/sys/fsctl.h scratch/System/sys
|
||||
mkdir tmpbin
|
||||
ln -s /usr/bin/xcodebuild tmpbin
|
||||
ln -s /usr/sbin/dtrace tmpbin
|
||||
export PATH=$PATH:$(pwd -P)/tmpbin
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
BASE=$(pwd -P)
|
||||
xcodebuild HEADER_SEARCH_PATHS="$BASE/fbsdcompat $BASE/pthreads $BASE/include $BASE/locale $BASE/locale/FreeBSD ${osx_sdk}/usr/local/include ${osx_sdk}/usr/include $BASE/stdtime/FreeBSD $BASE/gen ${osx_sdk}/System/Library/Frameworks/System.framework/PrivateHeaders $BASE/scratch ${osx_sdk}/System/Library/Frameworks/System.framework/PrivateHeaders/uuid $BASE/gdtoa"
|
||||
'';
|
||||
}
|
38
pkgs/os-specific/darwin/libc/fileport.patch
Normal file
38
pkgs/os-specific/darwin/libc/fileport.patch
Normal file
|
@ -0,0 +1,38 @@
|
|||
diff --git a/Platforms/macosx/Makefile.inc b/Platforms/macosx/Makefile.inc
|
||||
index ff3617f..fdda58f 100644
|
||||
--- a/Platforms/macosx/Makefile.inc
|
||||
+++ b/Platforms/macosx/Makefile.inc
|
||||
@@ -41,7 +41,7 @@ FEATURE_PATCH_3417676 = 1
|
||||
FEATURE_PATCH_5243343 = 1
|
||||
|
||||
# plockstat dtrace support
|
||||
-FEATURE_PLOCKSTAT = 1
|
||||
+FEATURE_PLOCKSTAT = 0
|
||||
|
||||
# Timezone change notification
|
||||
FEATURE_TIMEZONE_CHANGE_NOTIFICATION = 1
|
||||
diff --git a/gen/asl.c b/gen/asl.c
|
||||
index 1948c92..53fce02 100644
|
||||
--- a/gen/asl.c
|
||||
+++ b/gen/asl.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/fcntl.h>
|
||||
+#include <sys/fileport.h>
|
||||
#include <crt_externs.h>
|
||||
#include <asl.h>
|
||||
#include <regex.h>
|
||||
diff --git a/locale/FreeBSD/toupper.c b/locale/FreeBSD/toupper.c
|
||||
index d02ddd6..e5a1f10 100644
|
||||
--- a/locale/FreeBSD/toupper.c
|
||||
+++ b/locale/FreeBSD/toupper.c
|
||||
@@ -39,6 +39,8 @@ __FBSDID("$FreeBSD: src/lib/libc/locale/toupper.c,v 1.13 2007/01/09 00:28:01 imp
|
||||
#include <stdio.h>
|
||||
#include <runetype.h>
|
||||
|
||||
+#define __ct_rune_t ct_rune_t
|
||||
+
|
||||
__ct_rune_t
|
||||
___toupper_l(c, loc)
|
||||
__ct_rune_t c;
|
|
@ -1,43 +1,140 @@
|
|||
{ stdenv, pkgs, config
|
||||
, haveLibCxx ? true
|
||||
, useClang33 ? true }:
|
||||
{ system ? builtins.currentSystem
|
||||
, allPackages ? import ../../top-level/all-packages.nix
|
||||
, platform ? null
|
||||
, config ? {}
|
||||
}:
|
||||
|
||||
import ../generic rec {
|
||||
inherit config;
|
||||
rec {
|
||||
allPackages = import ../../top-level/all-packages.nix;
|
||||
|
||||
preHook =
|
||||
''
|
||||
export NIX_ENFORCE_PURITY=
|
||||
bootstrapTools = derivation {
|
||||
inherit system;
|
||||
|
||||
name = "trivial-bootstrap-tools";
|
||||
builder = "/bin/sh";
|
||||
args = [ ./trivialBootstrap.sh ];
|
||||
|
||||
mkdir = "/bin/mkdir";
|
||||
ln = "/bin/ln";
|
||||
};
|
||||
|
||||
# The simplest stdenv possible to run fetchadc and get the Apple command-line tools
|
||||
stage0 = rec {
|
||||
fetchurl = import ../../build-support/fetchurl {
|
||||
inherit stdenv;
|
||||
curl = bootstrapTools;
|
||||
};
|
||||
|
||||
stdenv = import ../generic {
|
||||
inherit system config;
|
||||
name = "stdenv-darwin-boot-0";
|
||||
shell = "/bin/bash";
|
||||
initialPath = [ bootstrapTools ];
|
||||
fetchurlBoot = fetchurl;
|
||||
cc = "/no-such-path";
|
||||
};
|
||||
};
|
||||
|
||||
buildTools = import ../../os-specific/darwin/command-line-tools {
|
||||
inherit (stage0) stdenv fetchurl;
|
||||
xar = bootstrapTools;
|
||||
gzip = bootstrapTools;
|
||||
cpio = bootstrapTools;
|
||||
};
|
||||
|
||||
preHook = ''
|
||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
${import ./prehook.nix}
|
||||
dontFixLibtool=1
|
||||
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
||||
xargsFlags=" "
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.7
|
||||
export SDKROOT=
|
||||
export SDKROOT_X=/ # FIXME: impure!
|
||||
export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT_X/usr/include -F$SDKROOT_X/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations"
|
||||
export NIX_LDFLAGS_AFTER+=" -L$SDKROOT_X/usr/lib"
|
||||
export CMAKE_OSX_ARCHITECTURES=x86_64
|
||||
'';
|
||||
|
||||
initialPath = (import ../common-path.nix) {pkgs = pkgs;};
|
||||
# A stdenv that wraps the Apple command-line tools and our other trivial symlinked bootstrap tools
|
||||
stage1 = rec {
|
||||
nativePrefix = "${buildTools.tools}/Library/Developer/CommandLineTools/usr";
|
||||
|
||||
system = stdenv.system;
|
||||
stdenv = import ../generic {
|
||||
name = "stdenv-darwin-boot-1";
|
||||
|
||||
inherit system config;
|
||||
inherit (stage0.stdenv) shell initialPath fetchurlBoot;
|
||||
|
||||
preHook = preHook + "\n" + ''
|
||||
export NIX_LDFLAGS_AFTER+=" -L/usr/lib"
|
||||
export NIX_ENFORCE_PURITY=
|
||||
export NIX_CFLAGS_COMPILE+=" -isystem ${nativePrefix}/include/c++/v1 -stdlib=libc++"
|
||||
export NIX_CFLAGS_LINK+=" -stdlib=libc++ -Wl,-rpath,${nativePrefix}/lib"
|
||||
'';
|
||||
|
||||
cc = import ../../build-support/cc-wrapper {
|
||||
nativeTools = true;
|
||||
nativePrefix = nativePrefix;
|
||||
nativeLibc = true;
|
||||
stdenv = stage0.stdenv;
|
||||
shell = "/bin/bash";
|
||||
cc = {
|
||||
name = "clang-9.9.9";
|
||||
cc = "/usr";
|
||||
outPath = "${buildTools.tools}/Library/Developer/CommandLineTools/usr";
|
||||
};
|
||||
};
|
||||
};
|
||||
pkgs = allPackages {
|
||||
inherit system platform;
|
||||
bootStdenv = stdenv;
|
||||
};
|
||||
};
|
||||
|
||||
stage2 = rec {
|
||||
stdenv = import ../generic {
|
||||
name = "stdenv-darwin-boot-2";
|
||||
|
||||
inherit system config;
|
||||
inherit (stage1.stdenv) shell fetchurlBoot preHook cc;
|
||||
|
||||
initialPath = [ stage1.pkgs.xz ] ++ stage1.stdenv.initialPath;
|
||||
};
|
||||
pkgs = allPackages {
|
||||
inherit system platform;
|
||||
bootStdenv = stdenv;
|
||||
};
|
||||
};
|
||||
|
||||
# Use stage1 to build a whole set of actual tools so we don't have to rely on the Apple prebuilt ones or
|
||||
# the ugly symlinked bootstrap tools anymore.
|
||||
stage3 = with stage2; import ../generic {
|
||||
name = "stdenv-darwin-boot-3";
|
||||
|
||||
inherit system config;
|
||||
inherit (stdenv) fetchurlBoot;
|
||||
|
||||
initialPath = (import ../common-path.nix) { inherit pkgs; };
|
||||
|
||||
preHook = preHook + "\n" + ''
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
'';
|
||||
|
||||
cc = import ../../build-support/cc-wrapper {
|
||||
inherit stdenv;
|
||||
nativeTools = false;
|
||||
nativeLibc = true;
|
||||
inherit stdenv;
|
||||
extraPackages = stdenv.lib.optional haveLibCxx pkgs.libcxx;
|
||||
binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;};
|
||||
cc = if useClang33 then pkgs.clang_33.cc else pkgs.clang.cc;
|
||||
binutils = pkgs.darwin.cctools_native;
|
||||
cc = pkgs.llvmPackages.clang;
|
||||
coreutils = pkgs.coreutils;
|
||||
shell = pkgs.bash + "/bin/sh";
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
extraPackages = [ pkgs.libcxx ];
|
||||
};
|
||||
|
||||
shell = pkgs.bash + "/bin/sh";
|
||||
|
||||
fetchurlBoot = stdenv.fetchurlBoot;
|
||||
|
||||
overrides = pkgs_: {
|
||||
inherit cc;
|
||||
inherit (cc) binutils;
|
||||
inherit (pkgs)
|
||||
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
||||
gnumake gnused gnutar gnugrep gnupatch perl libcxx libcxxabi;
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
};
|
||||
|
||||
stdenvDarwin = stage3;
|
||||
}
|
||||
|
|
66
pkgs/stdenv/darwin/trivialBootstrap.sh
Normal file
66
pkgs/stdenv/darwin/trivialBootstrap.sh
Normal file
|
@ -0,0 +1,66 @@
|
|||
|
||||
# Building bootstrap tools
|
||||
echo Building the trivial bootstrap environment...
|
||||
$mkdir -p $out/bin
|
||||
|
||||
$ln -s $ln $out/bin/ln
|
||||
|
||||
PATH=$out/bin/
|
||||
|
||||
cd $out/bin
|
||||
|
||||
ln -s $mkdir
|
||||
ln -s /bin/sh
|
||||
ln -s /bin/cp
|
||||
ln -s /bin/mv
|
||||
ln -s /bin/rm
|
||||
ln -s /bin/ls
|
||||
ln -s /bin/ps
|
||||
ln -s /bin/cat
|
||||
ln -s /bin/bash
|
||||
ln -s /bin/echo
|
||||
ln -s /bin/expr
|
||||
ln -s /bin/test
|
||||
ln -s /bin/date
|
||||
ln -s /bin/chmod
|
||||
ln -s /bin/rmdir
|
||||
ln -s /bin/sleep
|
||||
ln -s /bin/hostname
|
||||
|
||||
ln -s /usr/bin/id
|
||||
ln -s /usr/bin/od
|
||||
ln -s /usr/bin/tr
|
||||
ln -s /usr/bin/wc
|
||||
ln -s /usr/bin/cut
|
||||
ln -s /usr/bin/cmp
|
||||
ln -s /usr/bin/sed
|
||||
ln -s /usr/bin/tar
|
||||
ln -s /usr/bin/xar
|
||||
ln -s /usr/bin/awk
|
||||
ln -s /usr/bin/env
|
||||
ln -s /usr/bin/tee
|
||||
ln -s /usr/bin/comm
|
||||
ln -s /usr/bin/cpio
|
||||
ln -s /usr/bin/curl
|
||||
ln -s /usr/bin/find
|
||||
ln -s /usr/bin/grep
|
||||
ln -s /usr/bin/gzip
|
||||
ln -s /usr/bin/head
|
||||
ln -s /usr/bin/tail
|
||||
ln -s /usr/bin/sort
|
||||
ln -s /usr/bin/uniq
|
||||
ln -s /usr/bin/less
|
||||
ln -s /usr/bin/true
|
||||
ln -s /usr/bin/diff
|
||||
ln -s /usr/bin/egrep
|
||||
ln -s /usr/bin/fgrep
|
||||
ln -s /usr/bin/patch
|
||||
ln -s /usr/bin/uname
|
||||
ln -s /usr/bin/touch
|
||||
ln -s /usr/bin/split
|
||||
ln -s /usr/bin/xargs
|
||||
ln -s /usr/bin/which
|
||||
ln -s /usr/bin/install
|
||||
ln -s /usr/bin/basename
|
||||
ln -s /usr/bin/dirname
|
||||
ln -s /usr/bin/readlink
|
|
@ -33,30 +33,11 @@ rec {
|
|||
pkgs = stdenvNativePkgs;
|
||||
};
|
||||
|
||||
stdenvDarwin = import ./darwin {
|
||||
inherit config;
|
||||
stdenv = stdenvNative;
|
||||
pkgs = stdenvNativePkgs;
|
||||
};
|
||||
|
||||
stdenvDarwinNaked = import ./darwin {
|
||||
inherit config;
|
||||
stdenv = stdenvNative;
|
||||
pkgs = stdenvNativePkgs;
|
||||
haveLibCxx = false;
|
||||
};
|
||||
|
||||
stdenvDarwin33 = import ./darwin {
|
||||
inherit config;
|
||||
stdenv = stdenvNative;
|
||||
pkgs = stdenvNativePkgs;
|
||||
useClang33 = true;
|
||||
};
|
||||
|
||||
|
||||
# Linux standard environment.
|
||||
stdenvLinux = (import ./linux { inherit system allPackages platform config lib; }).stdenvLinux;
|
||||
|
||||
# Darwin standard environment.
|
||||
stdenvDarwin = (import ./darwin { inherit system allPackages platform config;}).stdenvDarwin;
|
||||
|
||||
# Select the appropriate stdenv for the platform `system'.
|
||||
stdenv =
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
, # Non-GNU/Linux OSes are currently "impure" platforms, with their libc
|
||||
# outside of the store. Thus, GCC, GFortran, & co. must always look for
|
||||
# files in standard system directories (/usr/include, etc.)
|
||||
noSysDirs ? (system != "x86_64-darwin"
|
||||
&& system != "x86_64-freebsd" && system != "i686-freebsd"
|
||||
noSysDirs ? (system != "x86_64-freebsd" && system != "i686-freebsd"
|
||||
&& system != "x86_64-kfreebsd-gnu")
|
||||
|
||||
# More flags for the bootstrapping of stdenv.
|
||||
|
@ -2092,11 +2091,7 @@ let
|
|||
|
||||
openssh_with_kerberos = pkgs.appendToName "with-kerberos" (openssh.override { withKerberos = true; });
|
||||
|
||||
opensp = callPackage ../tools/text/sgml/opensp {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then allStdenvs.stdenvDarwinNaked
|
||||
else stdenv;
|
||||
};
|
||||
opensp = callPackage ../tools/text/sgml/opensp { };
|
||||
|
||||
spCompat = callPackage ../tools/text/sgml/opensp/compat.nix { };
|
||||
|
||||
|
@ -3109,6 +3104,7 @@ let
|
|||
|
||||
clang = wrapCC llvmPackages.clang;
|
||||
|
||||
clang_35 = wrapCC llvmPackages_35.clang;
|
||||
clang_34 = wrapCC llvmPackages_34.clang;
|
||||
clang_33 = wrapCC (clangUnwrapped llvm_33 ../development/compilers/llvm/3.3/clang.nix);
|
||||
|
||||
|
@ -3642,7 +3638,7 @@ let
|
|||
|
||||
llvm_v = path: callPackage path { };
|
||||
|
||||
llvmPackages = llvmPackages_34;
|
||||
llvmPackages = if stdenv.isDarwin then llvmPackages_35 else llvmPackages_34;
|
||||
|
||||
llvmPackages_34 = recurseIntoAttrs (import ../development/compilers/llvm/3.4 {
|
||||
inherit stdenv newScope fetchurl;
|
||||
|
@ -3650,6 +3646,10 @@ let
|
|||
});
|
||||
llvmPackagesSelf = import ../development/compilers/llvm/3.4 { inherit newScope fetchurl; isl = isl_0_12; stdenv = libcxxStdenv; };
|
||||
|
||||
llvmPackages_35 = import ../development/compilers/llvm/3.5 {
|
||||
inherit pkgs stdenv newScope fetchurl isl;
|
||||
};
|
||||
|
||||
manticore = callPackage ../development/compilers/manticore { };
|
||||
|
||||
mentorToolchains = recurseIntoAttrs (
|
||||
|
@ -4655,7 +4655,10 @@ let
|
|||
|
||||
ctodo = callPackage ../applications/misc/ctodo { };
|
||||
|
||||
cmake = callPackage ../development/tools/build-managers/cmake { };
|
||||
cmake = callPackage ../development/tools/build-managers/cmake {
|
||||
wantPS = stdenv.isDarwin;
|
||||
ps = if stdenv.isDarwin then darwin.ps else null;
|
||||
};
|
||||
|
||||
cmake-3_0 = callPackage ../development/tools/build-managers/cmake/3.0.nix { };
|
||||
cmake264 = callPackage ../development/tools/build-managers/cmake/264.nix { };
|
||||
|
@ -4682,8 +4685,8 @@ let
|
|||
|
||||
csslint = callPackage ../development/web/csslint { };
|
||||
|
||||
libcxx = callPackage ../development/libraries/libc++ { stdenv = pkgs.clangStdenv; };
|
||||
libcxxabi = callPackage ../development/libraries/libc++abi { stdenv = pkgs.clangStdenv; };
|
||||
libcxx = llvmPackages_35.libcxx;
|
||||
libcxxabi = llvmPackages_35.libcxxabi;
|
||||
|
||||
libsigrok = callPackage ../development/tools/libsigrok { };
|
||||
|
||||
|
@ -4891,11 +4894,7 @@ let
|
|||
|
||||
peg = callPackage ../development/tools/parsing/peg { };
|
||||
|
||||
phantomjs = callPackage ../development/tools/phantomjs {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then overrideCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
phantomjs = callPackage ../development/tools/phantomjs { };
|
||||
|
||||
pmccabe = callPackage ../development/tools/misc/pmccabe { };
|
||||
|
||||
|
@ -5046,14 +5045,7 @@ let
|
|||
target = crossSystem;
|
||||
});
|
||||
|
||||
valgrind = callPackage ../development/tools/analysis/valgrind {
|
||||
stdenv =
|
||||
# On Darwin, Valgrind 3.7.0 expects Apple's GCC (for
|
||||
# `__private_extern'.)
|
||||
if stdenv.isDarwin
|
||||
then overrideCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
valgrind = callPackage ../development/tools/analysis/valgrind { };
|
||||
|
||||
valkyrie = callPackage ../development/tools/analysis/valkyrie { };
|
||||
|
||||
|
@ -5259,7 +5251,7 @@ let
|
|||
|
||||
coredumper = callPackage ../development/libraries/coredumper { };
|
||||
|
||||
ctl = dropCxx (callPackage ../development/libraries/ctl { });
|
||||
ctl = callPackage ../development/libraries/ctl { };
|
||||
|
||||
cpp-netlib = callPackage ../development/libraries/cpp-netlib { };
|
||||
|
||||
|
@ -5371,10 +5363,6 @@ let
|
|||
|
||||
ffmpeg_0_10 = callPackage ../development/libraries/ffmpeg/0.10.nix {
|
||||
vpxSupport = !stdenv.isMips;
|
||||
|
||||
stdenv = if stdenv.isDarwin
|
||||
then overrideCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
ffmpeg_1 = callPackage ../development/libraries/ffmpeg/1.x.nix {
|
||||
|
@ -5685,12 +5673,7 @@ let
|
|||
|
||||
pangox_compat = callPackage ../development/libraries/pangox-compat { };
|
||||
|
||||
gdk_pixbuf = callPackage ../development/libraries/gdk-pixbuf {
|
||||
# workaround signal 10 in gdk_pixbuf tests
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
gdk_pixbuf = callPackage ../development/libraries/gdk-pixbuf { };
|
||||
|
||||
gnome-sharp = callPackage ../development/libraries/gnome-sharp {};
|
||||
|
||||
|
@ -5790,7 +5773,7 @@ let
|
|||
|
||||
ilixi = callPackage ../development/libraries/ilixi { };
|
||||
|
||||
ilmbase = dropCxx (callPackage ../development/libraries/ilmbase { });
|
||||
ilmbase = callPackage ../development/libraries/ilmbase { };
|
||||
|
||||
imlib = callPackage ../development/libraries/imlib {
|
||||
libpng = libpng12;
|
||||
|
@ -5994,7 +5977,7 @@ let
|
|||
|
||||
libdc1394avt = callPackage ../development/libraries/libdc1394avt { };
|
||||
|
||||
libdevil = dropCxx (callPackage ../development/libraries/libdevil { });
|
||||
libdevil = callPackage ../development/libraries/libdevil { };
|
||||
|
||||
libdiscid = callPackage ../development/libraries/libdiscid { };
|
||||
|
||||
|
@ -6276,12 +6259,7 @@ let
|
|||
|
||||
libmicrohttpd = callPackage ../development/libraries/libmicrohttpd { };
|
||||
|
||||
libmikmod = callPackage ../development/libraries/libmikmod {
|
||||
# resolve the "stray '@' in program" errors
|
||||
stdenv = if stdenv.isDarwin
|
||||
then overrideCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
libmikmod = callPackage ../development/libraries/libmikmod { };
|
||||
|
||||
libmilter = callPackage ../development/libraries/libmilter { };
|
||||
|
||||
|
@ -6453,12 +6431,7 @@ let
|
|||
|
||||
libtomcrypt = callPackage ../development/libraries/libtomcrypt { };
|
||||
|
||||
libtorrentRasterbar = callPackage ../development/libraries/libtorrent-rasterbar {
|
||||
# fix "unrecognized option -arch" error
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
libtorrentRasterbar = callPackage ../development/libraries/libtorrent-rasterbar { };
|
||||
|
||||
libtorrentRasterbar_0_16 = callPackage ../development/libraries/libtorrent-rasterbar/0.16.nix {
|
||||
# fix "unrecognized option -arch" error
|
||||
|
@ -6501,13 +6474,13 @@ let
|
|||
|
||||
libusb = callPackage ../development/libraries/libusb {};
|
||||
|
||||
libusb1 = callPackage ../development/libraries/libusb1 {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
libusb1 = callPackage ../development/libraries/libusb1 { };
|
||||
|
||||
libunwind = callPackage ../development/libraries/libunwind { };
|
||||
libunwind = if stdenv.isDarwin
|
||||
then callPackage ../development/libraries/libunwind/native.nix {}
|
||||
else callPackage ../development/libraries/libunwind { };
|
||||
|
||||
libunwindNative = callPackage ../development/libraries/libunwind/native.nix {};
|
||||
|
||||
libuvVersions = recurseIntoAttrs (callPackage ../development/libraries/libuv { });
|
||||
|
||||
|
@ -6649,6 +6622,7 @@ let
|
|||
# makes it slower, but during runtime we link against just mesa_drivers
|
||||
# through /run/opengl-driver*, which is overriden according to config.grsecurity
|
||||
grsecEnabled = true;
|
||||
llvm = llvm_34;
|
||||
});
|
||||
mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { });
|
||||
mesa_drivers = mesaDarwinOr (
|
||||
|
@ -6821,13 +6795,9 @@ let
|
|||
# this ctl version is needed by openexr_viewers
|
||||
openexr_ctl = callPackage ../development/libraries/openexr_ctl { };
|
||||
|
||||
openexr = dropCxx (callPackage ../development/libraries/openexr { });
|
||||
openexr = callPackage ../development/libraries/openexr { };
|
||||
|
||||
openldap = callPackage ../development/libraries/openldap {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
openldap = callPackage ../development/libraries/openldap { };
|
||||
|
||||
openlierox = callPackage ../games/openlierox { };
|
||||
|
||||
|
@ -6926,12 +6896,7 @@ let
|
|||
|
||||
popt = callPackage ../development/libraries/popt { };
|
||||
|
||||
portaudio = callPackage ../development/libraries/portaudio {
|
||||
# resolves a variety of compile-time errors
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
portaudio = callPackage ../development/libraries/portaudio { };
|
||||
|
||||
portaudioSVN = callPackage ../development/libraries/portaudio/svn-head.nix { };
|
||||
|
||||
|
@ -6981,11 +6946,6 @@ let
|
|||
mesa = mesa_noglu;
|
||||
inherit (pkgs.gnome) libgnomeui GConf gnome_vfs;
|
||||
cups = if stdenv.isLinux then cups else null;
|
||||
|
||||
# resolve unrecognised flag '-fconstant-cfstrings' errors
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
qt48Full = appendToName "full" (qt48.override {
|
||||
|
@ -7104,12 +7064,7 @@ let
|
|||
|
||||
SDL_gfx = callPackage ../development/libraries/SDL_gfx { };
|
||||
|
||||
SDL_image = callPackage ../development/libraries/SDL_image {
|
||||
# provide an Objective-C compiler
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
SDL_image = callPackage ../development/libraries/SDL_image { };
|
||||
|
||||
SDL_mixer = callPackage ../development/libraries/SDL_mixer { };
|
||||
|
||||
|
@ -7217,11 +7172,7 @@ let
|
|||
ncurses = null;
|
||||
});
|
||||
|
||||
stfl = callPackage ../development/libraries/stfl {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then overrideCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
stfl = callPackage ../development/libraries/stfl { };
|
||||
|
||||
stlink = callPackage ../development/tools/misc/stlink { };
|
||||
|
||||
|
@ -7396,21 +7347,11 @@ let
|
|||
wxGTK29 = callPackage ../development/libraries/wxGTK-2.9/default.nix {
|
||||
inherit (gnome) GConf;
|
||||
withMesa = lib.elem system lib.platforms.mesaPlatforms;
|
||||
|
||||
# use for Objective-C++ compiler
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
wxGTK30 = callPackage ../development/libraries/wxGTK-3.0/default.nix {
|
||||
inherit (gnome) GConf;
|
||||
withMesa = lib.elem system lib.platforms.mesaPlatforms;
|
||||
|
||||
# use for Objective-C++ compiler
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
wtk = callPackage ../development/libraries/wtk { };
|
||||
|
@ -7726,11 +7667,7 @@ let
|
|||
|
||||
rhpl = callPackage ../development/python-modules/rhpl { };
|
||||
|
||||
pyqt4 = callPackage ../development/python-modules/pyqt/4.x.nix {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
pyqt4 = callPackage ../development/python-modules/pyqt/4.x.nix { };
|
||||
|
||||
pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { };
|
||||
|
||||
|
@ -8371,14 +8308,17 @@ let
|
|||
cramfsswap = callPackage ../os-specific/linux/cramfsswap { };
|
||||
|
||||
darwin = let
|
||||
cmdline = (callPackage ../os-specific/darwin/command-line-tools {}).pure { inherit xpwn; };
|
||||
cmdline = callPackage ../os-specific/darwin/command-line-tools {};
|
||||
in rec {
|
||||
cctools = forceNativeDrv (callPackage ../os-specific/darwin/cctools-port {
|
||||
|
||||
cctools = forceNativeDrv (callPackage ../os-specific/darwin/cctools/port.nix {
|
||||
cross = assert crossSystem != null; crossSystem;
|
||||
inherit maloader;
|
||||
xctoolchain = xcode.toolchain;
|
||||
});
|
||||
|
||||
cctools_native = (callPackage ../os-specific/darwin/cctools/port.nix {}).native;
|
||||
|
||||
maloader = callPackage ../os-specific/darwin/maloader {
|
||||
inherit opencflite;
|
||||
};
|
||||
|
@ -8387,9 +8327,14 @@ let
|
|||
|
||||
xcode = callPackage ../os-specific/darwin/xcode {};
|
||||
|
||||
libc = callPackage ../os-specific/darwin/libc {};
|
||||
|
||||
osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};
|
||||
osx_private_sdk = callPackage ../os-specific/darwin/osx-private-sdk { inherit osx_sdk; };
|
||||
|
||||
ps = callPackage ../os-specific/darwin/adv_cmds/ps.nix {};
|
||||
bootstrap_cmds = callPackage ../os-specific/darwin/bootstrap-cmds {};
|
||||
|
||||
security_tool = callPackage ../os-specific/darwin/security-tool { inherit osx_private_sdk; };
|
||||
|
||||
cmdline_sdk = cmdline.sdk;
|
||||
|
@ -10403,12 +10348,7 @@ let
|
|||
|
||||
iptraf = callPackage ../applications/networking/iptraf { };
|
||||
|
||||
irssi = callPackage ../applications/networking/irc/irssi {
|
||||
# compile with gccApple on darwin to support the -no-cpp-precompile flag
|
||||
stdenv = if stdenv.isDarwin
|
||||
then stdenvAdapters.overrideCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
irssi = callPackage ../applications/networking/irc/irssi { };
|
||||
|
||||
irssi_fish = callPackage ../applications/networking/irc/irssi/fish { };
|
||||
|
||||
|
@ -11465,9 +11405,6 @@ let
|
|||
|
||||
# optional features by flags
|
||||
flags = [ "python" "X11" ]; # only flag "X11" by now
|
||||
|
||||
# so that we can use gccApple if we're building on darwin
|
||||
inherit stdenvAdapters gccApple;
|
||||
});
|
||||
|
||||
vimNox = lowPrio (vim_configurable.override { source = "vim-nox"; });
|
||||
|
@ -11480,7 +11417,7 @@ let
|
|||
inherit (pkgs.xlibs) libX11 libXext libSM libXpm libXt libXaw libXau libXmu
|
||||
libICE;
|
||||
|
||||
inherit (pkgs) stdenvAdapters gccApple;
|
||||
inherit (pkgs) stdenvAdapters;
|
||||
|
||||
features = "huge"; # one of tiny, small, normal, big or huge
|
||||
lua = pkgs.lua5;
|
||||
|
|
Loading…
Reference in a new issue