diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2016-10-22 17:23:24 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2016-10-22 17:23:24 +0200 |
commit | e56832d7301f2be7c18abf12d151db00be88f6fa (patch) | |
tree | 8023c83da9db86e0a31535ad9b09e9f601c3b250 /pkgs/development/compilers | |
parent | bd12c109931951a36449edaa9c8ed3fc85dc6984 (diff) | |
parent | 8c465c5201e819486b3072be563738cc1801e8d7 (diff) | |
download | nixpkgs-e56832d7301f2be7c18abf12d151db00be88f6fa.tar nixpkgs-e56832d7301f2be7c18abf12d151db00be88f6fa.tar.gz nixpkgs-e56832d7301f2be7c18abf12d151db00be88f6fa.tar.bz2 nixpkgs-e56832d7301f2be7c18abf12d151db00be88f6fa.tar.lz nixpkgs-e56832d7301f2be7c18abf12d151db00be88f6fa.tar.xz nixpkgs-e56832d7301f2be7c18abf12d151db00be88f6fa.tar.zst nixpkgs-e56832d7301f2be7c18abf12d151db00be88f6fa.zip |
Merge remote-tracking branch 'upstream/master' into HEAD
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/glslang/default.nix | 25 | ||||
-rw-r--r-- | pkgs/development/compilers/glslang/install-headers.patch | 26 | ||||
-rw-r--r-- | pkgs/development/compilers/go/1.7.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.9/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.9/llvm.nix | 20 | ||||
-rw-r--r-- | pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/ponyc/default.nix | 67 | ||||
-rw-r--r-- | pkgs/development/compilers/ponyc/disable-tests.patch | 17 | ||||
-rw-r--r-- | pkgs/development/compilers/shaderc/default.nix | 31 |
10 files changed, 166 insertions, 36 deletions
diff --git a/pkgs/development/compilers/glslang/default.nix b/pkgs/development/compilers/glslang/default.nix new file mode 100644 index 00000000000..63b4b4c2c4f --- /dev/null +++ b/pkgs/development/compilers/glslang/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, cmake, bison }: + +stdenv.mkDerivation rec { + name = "glslang-git-${version}"; + version = "2016-08-26"; + + # `vulkan-loader` requires a specific version of `glslang` as specified in + # `<vulkan-loader-repo>/glslang_revision`. + src = fetchFromGitHub { + owner = "KhronosGroup"; + repo = "glslang"; + rev = "81cd764b5ffc475bc73f1fb35f75fd1171bb2343"; + sha256 = "1vfwl6lzkjh9nh29q32b7zca4q1abf3q4nqkahskijgznw5lr59g"; + }; + + patches = [ ./install-headers.patch ]; + + buildInputs = [ cmake bison ]; + enableParallelBuilding = true; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Khronos reference front-end for GLSL and ESSL"; + }; +} diff --git a/pkgs/development/compilers/glslang/install-headers.patch b/pkgs/development/compilers/glslang/install-headers.patch new file mode 100644 index 00000000000..9ad6f5e1906 --- /dev/null +++ b/pkgs/development/compilers/glslang/install-headers.patch @@ -0,0 +1,26 @@ +diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt +index 48a6c46..593d941 100755 +--- a/SPIRV/CMakeLists.txt ++++ b/SPIRV/CMakeLists.txt +@@ -42,3 +42,8 @@ endif(WIN32) + + install(TARGETS SPIRV SPVRemapper + ARCHIVE DESTINATION lib) ++ ++foreach(file ${HEADERS} ${SPVREMAP_HEADERS}) ++ get_filename_component(dir ${file} DIRECTORY) ++ install(FILES ${file} DESTINATION include/SPIRV/${dir}) ++endforeach() +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index ff91135..4318279 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -90,3 +90,8 @@ endif(WIN32) + + install(TARGETS glslang + ARCHIVE DESTINATION lib) ++ ++foreach(file ${HEADERS}) ++ get_filename_component(dir ${file} DIRECTORY) ++ install(FILES ${file} DESTINATION include/glslang/${dir}) ++endforeach() diff --git a/pkgs/development/compilers/go/1.7.nix b/pkgs/development/compilers/go/1.7.nix index 0f78646e1aa..3def735ec8d 100644 --- a/pkgs/development/compilers/go/1.7.nix +++ b/pkgs/development/compilers/go/1.7.nix @@ -138,7 +138,7 @@ stdenv.mkDerivation rec { preFixup = '' rm -r $out/share/go/pkg/bootstrap - mv $out/share/go/bin $out/bin + ln -s $out/share/go/bin $out/bin ''; setupHook = ./setup-hook.sh; diff --git a/pkgs/development/compilers/llvm/3.9/default.nix b/pkgs/development/compilers/llvm/3.9/default.nix index a39f013d1a9..17351ae8736 100644 --- a/pkgs/development/compilers/llvm/3.9/default.nix +++ b/pkgs/development/compilers/llvm/3.9/default.nix @@ -1,4 +1,4 @@ -{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC }: +{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, darwin }: let callPackage = newScope (self // { inherit stdenv isl version fetch; }); diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix index 22dea611c79..8086f980bcf 100644 --- a/pkgs/development/compilers/llvm/3.9/llvm.nix +++ b/pkgs/development/compilers/llvm/3.9/llvm.nix @@ -15,10 +15,16 @@ , libcxxabi , debugVersion ? false , enableSharedLibraries ? true +, darwin }: let src = fetch "llvm" "0j49lkd5d7nnpdqzaybs2472bvcxyx0i4r3iccwf3kj2v9wk3iv6"; + shlib = if stdenv.isDarwin then "dylib" else "so"; + + # Used when creating a version-suffixed symlink of libLLVM.dylib + shortVersion = with stdenv.lib; + concatStringsSep "." (take 2 (splitString "." version)); in stdenv.mkDerivation rec { name = "llvm-${version}"; @@ -33,7 +39,8 @@ in stdenv.mkDerivation rec { outputs = [ "out" ] ++ stdenv.lib.optional enableSharedLibraries "lib"; buildInputs = [ perl groff cmake libxml2 python libffi ] - ++ stdenv.lib.optional stdenv.isDarwin libcxxabi; + ++ stdenv.lib.optionals stdenv.isDarwin + [ libcxxabi darwin.cctools darwin.apple_sdk.libs.xpc ]; propagatedBuildInputs = [ ncurses zlib ]; @@ -70,6 +77,7 @@ in stdenv.mkDerivation rec { ++ stdenv.lib.optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" + "-DCMAKE_LIBTOOL=${darwin.cctools}/bin/libtool" ]; postBuild = '' @@ -81,13 +89,17 @@ in stdenv.mkDerivation rec { postInstall = "" + stdenv.lib.optionalString (enableSharedLibraries) '' moveToOutput "lib/libLLVM-*" "$lib" - moveToOutput "lib/libLLVM.so" "$lib" + moveToOutput "lib/libLLVM.${shlib}" "$lib" substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-" '' + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' - install_name_tool -id $out/lib/libLLVM.dylib $out/lib/libLLVM.dylib - ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib + substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \ + --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" + install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib + install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${version}.dylib ''; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix index f1b27bdb54f..e8d737e0082 100644 --- a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix +++ b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix @@ -1,9 +1,9 @@ import ./jdk-linux-base.nix { productVersion = "8"; - patchVersion = "101"; + patchVersion = "111"; downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; - sha256_i686 = "0p9nvaifb1mn7scmprbcyv9a4lyqy8i0mf7rsb59cli30vpi44mi"; - sha256_x86_64 = "0a0kb3c7xfh81vx5sicw2frgxq0gyv5qp0d725rviwldlcxk4zs6"; + sha256_i686 = "07wyyds52c3fp4ha1fnzp6mbxwq0rs3vx59167b57gkggg7qz3ls"; + sha256_x86_64 = "0x4937c3307v78wx1jf227b89cf5lsd5yarmbjrxs4pq6lidlzhq"; jceName = "jce_policy-8.zip"; jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk"; diff --git a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix index b760ac7135a..fc2e6448fc3 100644 --- a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix +++ b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix @@ -1,9 +1,9 @@ import ./jdk-linux-base.nix { productVersion = "8"; - patchVersion = "102"; + patchVersion = "112"; downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; - sha256_i686 = "1bsypgf9va8jds0rlpnwp9n9p11hz77gqlmb0b0w2qwfmlmi227d"; - sha256_x86_64 = "1dq4kqi8k2k11sc28fnbp6cmncfj86jv57iy1gkap94i0fyf1yvw"; + sha256_i686 = "19b9vwb7bd17s9p04y47zzjkccazzmpy4dqx4rgxd79k1fw2yz0y"; + sha256_x86_64 = "19blsx81x5p2f6d9vig89z7cc8778cp6qdjy9ylsa2444vaxfyvp"; jceName = "jce_policy-8.zip"; jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk"; diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix index 93ce5037fed..9d451c2e4f3 100644 --- a/pkgs/development/compilers/ponyc/default.nix +++ b/pkgs/development/compilers/ponyc/default.nix @@ -1,16 +1,19 @@ -{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2, coreutils }: +{ stdenv, fetchFromGitHub, llvm, makeWrapper, pcre2, coreutils, which, libressl, + cc ? stdenv.cc, lto ? !stdenv.isDarwin }: -stdenv.mkDerivation { - name = "ponyc-2016-07-26"; +stdenv.mkDerivation ( rec { + name = "ponyc-${version}"; + version = "0.5.1"; src = fetchFromGitHub { owner = "ponylang"; repo = "ponyc"; - rev = "4eec8a9b0d9936b2a0249bd17fd7a2caac6aaa9c"; - sha256 = "184x2jivp7826i60rf0dpx0a9dg5rsj56dv0cll28as4nyqfmna2"; + rev = version; + sha256 = "14c6qs3cqn9hk2hrq2d5rd4cmwzzz2fcb02dg5q1blq17pj7mcxa"; }; - buildInputs = [ llvm makeWrapper ]; + buildInputs = [ llvm makeWrapper which ]; + propagatedBuildInputs = [ cc ]; # Disable problematic networking tests patches = [ ./disable-tests.patch ]; @@ -18,37 +21,69 @@ stdenv.mkDerivation { preBuild = '' # Fix tests substituteInPlace packages/process/_test.pony \ - --replace "/bin/cat" "${coreutils}/bin/cat" + --replace '"/bin/' '"${coreutils}/bin/' + substituteInPlace packages/process/_test.pony \ + --replace '=/bin' "${coreutils}/bin" + + + # Fix llvm-ar check for darwin + substituteInPlace Makefile \ + --replace "llvm-ar-3.8" "llvm-ar" + + # Remove impure system refs + substituteInPlace src/libponyc/pkg/package.c \ + --replace "/usr/local/lib" "" + substituteInPlace src/libponyc/pkg/package.c \ + --replace "/opt/local/lib" "" + + for file in `grep -irl '/usr/local/opt/libressl/lib' ./*`; do + substituteInPlace $file --replace '/usr/local/opt/libressl/lib' "${stdenv.lib.getLib libressl}/lib" + done + + # Fix ponypath issue + substituteInPlace Makefile \ + --replace "PONYPATH=." "PONYPATH=.:\$(PONYPATH)" export LLVM_CONFIG=${llvm}/bin/llvm-config + '' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (!cc.isClang) && lto) '' + export LTO_PLUGIN=`find ${cc.cc}/ -name liblto_plugin.so` + '' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (cc.isClang) && lto) '' + export LTO_PLUGIN=`find ${cc.cc}/ -name LLVMgold.so` ''; - makeFlags = [ "config=release" ]; + makeFlags = [ "config=release" ] ++ stdenv.lib.optionals stdenv.isDarwin [ "bits=64" ] + ++ stdenv.lib.optionals (stdenv.isDarwin && (!lto)) [ "lto=no" ]; enableParallelBuilding = true; doCheck = true; - checkTarget = "test"; + checkTarget = "test-ci"; preCheck = '' - export LIBRARY_PATH="$out/lib:${stdenv.lib.makeLibraryPath [ openssl pcre2 ]}" + export PONYPATH="$out/lib:${stdenv.lib.makeLibraryPath [ pcre2 libressl ]}" ''; installPhase = '' - make config=release prefix=$out install + make config=release prefix=$out '' + + stdenv.lib.optionalString stdenv.isDarwin '' bits=64 '' + + stdenv.lib.optionalString (stdenv.isDarwin && (!lto)) '' lto=no '' + + '' install mv $out/bin/ponyc $out/bin/ponyc.wrapped makeWrapper $out/bin/ponyc.wrapped $out/bin/ponyc \ - --prefix LIBRARY_PATH : "$out/lib" \ - --prefix LIBRARY_PATH : "${openssl.out}/lib" \ - --prefix LIBRARY_PATH : "${pcre2}/lib" + --prefix PONYPATH : "$out/lib" \ + --prefix PONYPATH : "${stdenv.lib.getLib pcre2}/lib" \ + --prefix PONYPATH : "${stdenv.lib.getLib libressl}/lib" ''; + # Stripping breaks linking for ponyc + dontStrip = true; + meta = { description = "Pony is an Object-oriented, actor-model, capabilities-secure, high performance programming language"; homepage = http://www.ponylang.org; license = stdenv.lib.licenses.bsd2; maintainers = [ stdenv.lib.maintainers.doublec ]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; }; -} +}) diff --git a/pkgs/development/compilers/ponyc/disable-tests.patch b/pkgs/development/compilers/ponyc/disable-tests.patch index 9335ebd6eea..804a99fddcd 100644 --- a/pkgs/development/compilers/ponyc/disable-tests.patch +++ b/pkgs/development/compilers/ponyc/disable-tests.patch @@ -1,16 +1,17 @@ diff --git a/packages/net/_test.pony b/packages/net/_test.pony -index d6c3e56..dc37dd9 100644 +index ce26bd7..9a98cc7 100644 --- a/packages/net/_test.pony +++ b/packages/net/_test.pony -@@ -7,11 +7,6 @@ actor Main is TestList +@@ -5,11 +5,7 @@ actor Main is TestList + new make() => None + fun tag tests(test: PonyTest) => - test(_TestReadBuffer) - test(_TestWriteBuffer) - test(_TestBroadcast) +- test(_TestTCPWritev) - ifdef not windows then - test(_TestTCPExpect) -- test(_TestTCPWritev) - end - - class iso _TestReadBuffer is UnitTest - """ ++ None + + class _TestPing is UDPNotify + let _h: TestHelper diff --git a/pkgs/development/compilers/shaderc/default.nix b/pkgs/development/compilers/shaderc/default.nix new file mode 100644 index 00000000000..df0c136d05f --- /dev/null +++ b/pkgs/development/compilers/shaderc/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, cmake, glslang, spirv-tools, python }: + +stdenv.mkDerivation rec { + name = "shaderc-git-${version}"; + version = "2016-09-08"; + + # `vulkan-loader` requires a specific version of `glslang` as specified in + # `<vulkan-loader-repo>/glslang_revision`. + src = fetchFromGitHub { + owner = "google"; + repo = "shaderc"; + rev = "e17bb8ba3b8b0b9142b788d988612a40541c54ce"; + sha256 = "17qfjqkz6j355qi130kixaz51svl09k9b5sfikksgnbmzglzcwki"; + }; + + patchPhase = '' + cp -r ${spirv-tools.src} third_party/spirv-tools + chmod -R +w third_party/spirv-tools + ln -s ${spirv-tools.headers} third_party/spirv-tools/external/spirv-headers + ''; + + buildInputs = [ cmake glslang python ]; + enableParallelBuilding = true; + + cmakeFlags = [ "-DSHADERC_SKIP_TESTS=ON" "-DSHADERC_GLSLANG_DIR=${glslang.src}" ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "A collection of tools, libraries and tests for shader compilation."; + }; +} |