ponyc: 0.38.3 -> 0.41.1 * Fix NullablePointer type constraint check being omitted in FFI declarations * Change to Steed's model of subtyping * Fix memory corruption with Array.chop and String.chop * Improve error message for match on structs * RFC 68: Mandatory FFI declarations * Change return type of String.add to String iso^ * Improve error message on destructuring of non-tuple types * Use built-in offset argument to cpointer * Add IsPrime checker to math package * Fix compiler crash related to type parameter references * Fix literal inference through partial function * Fix partial FFI declarations ignoring partial annotation * Fix symbol table patching for overriding default methods * Fix tuple related compiler segfaults * Create a standalone libponyc on Linux

+30 -19
+10 -13
pkgs/development/compilers/ponyc/default.nix
··· 3 3 4 4 stdenv.mkDerivation (rec { 5 5 pname = "ponyc"; 6 - version = "0.38.3"; 6 + version = "0.41.1"; 7 7 8 8 src = fetchFromGitHub { 9 9 owner = "ponylang"; 10 10 repo = pname; 11 11 rev = version; 12 - sha256 = "14kivmyphi7gbd7mgd4cnsiwl4cl7wih8kwzh7n79s2s4c5hj4ak"; 12 + sha256 = "02wx070cy1193xzv58vh79yzwgpqiayqlwd3i285698fppbcg69a"; 13 13 14 14 # Due to a bug in LLVM 9.x, ponyc has to include its own vendored patched 15 15 # LLVM. (The submodule is a specific tag in the LLVM source tree). ··· 23 23 fetchSubmodules = true; 24 24 }; 25 25 26 - ponygbenchmark = fetchurl { 27 - url = "https://github.com/google/benchmark/archive/v1.5.0.tar.gz"; 28 - sha256 = "06i2cr4rj126m1zfz0x1rbxv1mw1l7a11mzal5kqk56cdrdicsiw"; 29 - name = "v1.5.0.tar.gz"; 26 + ponygbenchmark = fetchFromGitHub { 27 + owner = "google"; 28 + repo = "benchmark"; 29 + rev = "v1.5.2"; 30 + sha256 = "13rxagpzw6bal6ajlmrxlh9kgfvcixn6j734b2bvfqz7lch8n0pa"; 30 31 }; 31 32 32 33 nativeBuildInputs = [ cmake makeWrapper which ]; 33 34 buildInputs = [ libxml2 z3 ]; 34 - propagatedBuildInputs = [ cc ]; 35 35 36 36 # Sandbox disallows network access, so disabling problematic networking tests 37 37 patches = [ 38 38 ./disable-tests.patch 39 + ./fix-libstdcpp-path.patch 39 40 (substituteAll { 40 41 src = ./make-safe-for-sandbox.patch; 41 42 googletest = fetchurl { 42 43 url = "https://github.com/google/googletest/archive/release-1.8.1.tar.gz"; 43 44 sha256 = "17147961i01fl099ygxjx4asvjanwdd446nwbq9v8156h98zxwcv"; 44 - name = "release-1.8.1.tar.gz"; 45 45 }; 46 46 }) 47 47 ]; 48 48 49 49 postUnpack = '' 50 50 mkdir -p source/build/build_libs/gbenchmark-prefix/src 51 - tar -C source/build/build_libs/gbenchmark-prefix/src -zxvf "$ponygbenchmark" 52 - mv source/build/build_libs/gbenchmark-prefix/src/benchmark-1.5.0 \ 53 - source/build/build_libs/gbenchmark-prefix/src/benchmark 51 + cp -r "$ponygbenchmark"/ source/build/build_libs/gbenchmark-prefix/src/benchmark 52 + chmod -R u+w source/build/build_libs/gbenchmark-prefix/src/benchmark 54 53 ''; 55 54 56 55 dontConfigure = true; ··· 61 60 patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2020-09-01-is-trivially-copyable.diff 62 61 patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2020-01-07-01-c-exports.diff 63 62 patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2019-12-23-01-jit-eh-frames.diff 64 - 65 63 substituteInPlace packages/process/_test.pony \ 66 64 --replace '"/bin/' '"${coreutils}/bin/' \ 67 65 --replace '=/bin' "${coreutils}/bin" ··· 91 89 + lib.optionalString stdenv.isDarwin "bits=64 " 92 90 + lib.optionalString (stdenv.isDarwin && (!lto)) "lto=no " 93 91 + '' install 94 - 95 92 wrapProgram $out/bin/ponyc \ 96 93 --prefix PATH ":" "${stdenv.cc}/bin" \ 97 94 --set-default CC "$CC" \
+14
pkgs/development/compilers/ponyc/fix-libstdcpp-path.patch
··· 1 + diff --git a/src/libponyc/CMakeLists.txt b/src/libponyc/CMakeLists.txt 2 + index bf2c385e..11d0d619 100644 3 + --- a/src/libponyc/CMakeLists.txt 4 + +++ b/src/libponyc/CMakeLists.txt 5 + @@ -136,7 +136,7 @@ elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "DragonFly") 6 + else() 7 + # add a rule to generate the standalone library if needed 8 + add_custom_command(OUTPUT libponyc-standalone.a 9 + - COMMAND cp `find /usr/lib/ -name 'libstdc++.a' -print -quit` libstdcpp.a 10 + + COMMAND cp `${CMAKE_CXX_COMPILER} --print-file-name='libstdc++.a'` libstdcpp.a 11 + COMMAND echo "create libponyc-standalone.a" > standalone.mri 12 + COMMAND echo "addlib ${PROJECT_SOURCE_DIR}/../../build/libs/lib/libblake2.a" >> standalone.mri 13 + COMMAND echo "addlib libstdcpp.a" >> standalone.mri 14 +
+5 -5
pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch
··· 1 - --- a/lib/CMakeLists.txt 2020-09-27 02:39:12.862940179 +0000 2 - +++ b/lib/CMakeLists.txt 2020-09-27 02:39:16.451957865 +0000 1 + --- a/lib/CMakeLists.txt 2021-05-27 15:58:36.819331229 -0400 2 + +++ b/lib/CMakeLists.txt 2021-05-27 16:00:19.768268649 -0400 3 3 @@ -10,12 +10,12 @@ 4 4 endif() 5 5 6 6 ExternalProject_Add(gbenchmark 7 - - URL https://github.com/google/benchmark/archive/v1.5.0.tar.gz 7 + - URL https://github.com/google/benchmark/archive/v1.5.2.tar.gz 8 8 + SOURCE_DIR gbenchmark-prefix/src/benchmark 9 9 CMAKE_ARGS -DCMAKE_BUILD_TYPE=${PONYC_LIBS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DCMAKE_CXX_FLAGS=-fpic --no-warn-unused-cli 10 10 ) ··· 30 30 - option(GIT_SUBMODULE "Check submodules during build" ON) 31 31 - if(GIT_SUBMODULE) 32 32 - message(STATUS "Updating submodules...") 33 - - execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive 33 + - execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --depth 1 34 34 - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 35 35 - RESULT_VARIABLE git_submod_result) 36 36 - #message("git_submod_result ${git_submod_result}") 37 37 - if(NOT git_submod_result EQUAL "0") 38 - - message(FATAL_ERROR "git submodule update --init --recursive failed with ${git_submod_result}, please checkout submodules") 38 + - message(FATAL_ERROR "git submodule update --init --recursive --depth 1 failed with ${git_submod_result}, please checkout submodules") 39 39 - endif() 40 40 - 41 41 - # we check to make sure the submodule hash matches
+1 -1
pkgs/top-level/all-packages.nix
··· 11572 11572 11573 11573 ponyc = callPackage ../development/compilers/ponyc { 11574 11574 # Upstream pony has dropped support for versions compiled with gcc. 11575 - stdenv = clangStdenv; 11575 + stdenv = llvmPackages_9.stdenv; 11576 11576 }; 11577 11577 11578 11578 pony-corral = callPackage ../development/compilers/ponyc/pony-corral.nix { };