Merge pull request #140189 from redvers/ponyc-0.44.0

ponyc: 0.42.0 -> 0.44.0, pony-corral: 0.5.3 -> 0.5.4, pony-stable: removal

authored by

Dmitry Kalinkin and committed by
GitHub
b99fc173 c7babfc4

+34 -68
+12 -13
pkgs/development/compilers/ponyc/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, fetchurl, makeWrapper, pcre2, coreutils, which, openssl, libxml2, cmake, z3, substituteAll, 1 + { lib, stdenv, fetchFromGitHub, fetchurl, makeWrapper, pcre2, coreutils, which, openssl, libxml2, cmake, z3, substituteAll, python3, 2 2 cc ? stdenv.cc, lto ? !stdenv.isDarwin }: 3 3 4 4 stdenv.mkDerivation (rec { 5 5 pname = "ponyc"; 6 - version = "0.42.0"; 6 + version = "0.44.0"; 7 7 8 8 src = fetchFromGitHub { 9 9 owner = "ponylang"; 10 10 repo = pname; 11 11 rev = version; 12 - sha256 = "1s8glmzz0g5lj1fjwwy4m3n660smiq5wl9r1lg686wqh42hcgnsy"; 12 + sha256 = "0bzdkrrh6lvfqc61kdxvgz573dj32wwzhzwil53jvynhfcwp38ld"; 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). ··· 26 26 ponygbenchmark = fetchFromGitHub { 27 27 owner = "google"; 28 28 repo = "benchmark"; 29 - rev = "v1.5.2"; 30 - sha256 = "13rxagpzw6bal6ajlmrxlh9kgfvcixn6j734b2bvfqz7lch8n0pa"; 29 + rev = "v1.5.4"; 30 + sha256 = "1dbjdjzkpbsq3jl9ksyg8mw759vkac8qzq1557m73ldnavbhz48x"; 31 31 }; 32 32 33 - nativeBuildInputs = [ cmake makeWrapper which ]; 33 + nativeBuildInputs = [ cmake makeWrapper which python3 ]; 34 34 buildInputs = [ libxml2 z3 ]; 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 40 39 (substituteAll { 41 40 src = ./make-safe-for-sandbox.patch; 42 - googletest = fetchurl { 43 - url = "https://github.com/google/googletest/archive/release-1.8.1.tar.gz"; 44 - sha256 = "17147961i01fl099ygxjx4asvjanwdd446nwbq9v8156h98zxwcv"; 41 + googletest = fetchFromGitHub { 42 + owner = "google"; 43 + repo = "googletest"; 44 + rev = "release-1.10.0"; 45 + sha256 = "1zbmab9295scgg4z2vclgfgjchfjailjnvzc6f5x9jvlsdi3dpwz"; 45 46 }; 46 47 }) 47 48 ]; ··· 57 58 postPatch = '' 58 59 # Patching Vendor LLVM 59 60 patchShebangs --host build/build_libs/gbenchmark-prefix/src/benchmark/tools/*.py 60 - patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2020-09-01-is-trivially-copyable.diff 61 - patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2020-01-07-01-c-exports.diff 62 - patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2019-12-23-01-jit-eh-frames.diff 61 + patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2020-07-28-01-c-exports.diff 63 62 substituteInPlace packages/process/_test.pony \ 64 63 --replace '"/bin/' '"${coreutils}/bin/' \ 65 64 --replace '=/bin' "${coreutils}/bin"
-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 -
+20 -13
pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch
··· 1 - --- a/lib/CMakeLists.txt.orig 2021-07-07 13:40:20.209410160 -0400 2 - +++ a/lib/CMakeLists.txt 2021-07-07 13:43:11.886969662 -0400 1 + --- a/lib/CMakeLists.txt.orig 2021-10-01 13:04:00.867762912 -0400 2 + +++ a/lib/CMakeLists.txt 2021-10-01 13:06:21.220023453 -0400 3 3 @@ -15,12 +15,12 @@ 4 4 endif() 5 5 6 6 ExternalProject_Add(gbenchmark 7 7 - URL ${PONYC_GBENCHMARK_URL} 8 - + SOURCE_DIR gbenchmark-prefix/src/benchmark 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 ) 11 11 12 12 ExternalProject_Add(googletest 13 - - URL https://github.com/google/googletest/archive/release-1.8.1.tar.gz 14 - + URL @googletest@ 13 + - URL https://github.com/google/googletest/archive/release-1.10.0.tar.gz 14 + + URL @googletest@ 15 15 CMAKE_ARGS -DCMAKE_BUILD_TYPE=${PONYC_LIBS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_CXX_FLAGS=-fpic -Dgtest_force_shared_crt=ON --no-warn-unused-cli 16 16 ) 17 17 18 - @@ -33,75 +33,6 @@ 18 + @@ -33,82 +33,6 @@ 19 19 COMPONENT library 20 20 ) 21 21 22 22 -find_package(Git) 23 23 - 24 - -set(LLVM_DESIRED_HASH "c1a0a213378a458fbea1a5c77b315c7dce08fd05") 25 - -set(PATCHES_DESIRED_HASH "9063f83d727bf042a1232420e168c1ea192bf6a2960d35e57123245b630eb923") 24 + -set(LLVM_DESIRED_HASH "fed41342a82f5a3a9201819a82bf7a48313e296b") 25 + -set(PATCHES_DESIRED_HASH "3a655193262fd9b2e87340e096efcbd96726a07fe6dd42a263f3a4fc2dc0192e") 26 26 - 27 27 -if(GIT_FOUND) 28 28 - if(EXISTS "${PROJECT_SOURCE_DIR}/../.git") ··· 56 56 - file(GLOB PONY_LLVM_PATCHES "${PROJECT_SOURCE_DIR}/llvm/patches/*.diff") 57 57 - 58 58 - # check to see if the patch hashes match 59 + - message("Checking patches ${PONY_LLVM_PATCHES}") 59 60 - set(PATCHES_ACTUAL_HASH "") 60 61 - foreach (PATCH ${PONY_LLVM_PATCHES}) 61 - - file(SHA256 ${PATCH} patch_file_hash) 62 - - string(CONCAT PATCHES_ACTUAL_HASH patch_file_hash) 62 + - file(STRINGS ${PATCH} patch_file NEWLINE_CONSUME) 63 + - string(REPLACE "\n" " " patch_file ${patch_file}) 64 + - string(SHA256 patch_file_hash ${patch_file}) 65 + - # message("${PATCH}: '${patch_file_hash}'") 66 + - string(CONCAT PATCHES_ACTUAL_HASH ${PATCHES_ACTUAL_HASH} ${patch_file_hash}) 67 + - # message("concat is '${PATCHES_ACTUAL_HASH}'") 63 68 - endforeach() 64 69 - string(SHA256 PATCHES_ACTUAL_HASH ${PATCHES_ACTUAL_HASH}) 70 + - # message("Desired hash ${PATCHES_DESIRED_HASH}") 71 + - # message("Actual hash ${PATCHES_ACTUAL_HASH}") 65 72 - if(NOT PATCHES_ACTUAL_HASH EQUAL "${PATCHES_DESIRED_HASH}") 66 73 - message(FATAL_ERROR "Patch hash actual ${PATCHES_ACTUAL_HASH} does not match desired ${PATCHES_DESIRED_HASH}") 67 74 - endif() ··· 88 95 - message(FATAL_ERROR "Git not found!") 89 96 -endif() 90 97 - 91 - if (NOT DEFINED LLVM_TARGETS_TO_BUILD) 92 - set(LLVM_TARGETS_TO_BUILD X86) 93 - endif() 98 + message("Building targets: ${LLVM_TARGETS_TO_BUILD}") 99 + 100 + set(LLVM_ENABLE_BINDINGS OFF)
+2 -2
pkgs/development/compilers/ponyc/pony-corral.nix
··· 2 2 3 3 stdenv.mkDerivation ( rec { 4 4 pname = "corral"; 5 - version = "0.5.3"; 5 + version = "0.5.4"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "ponylang"; 9 9 repo = pname; 10 10 rev = version; 11 - sha256 = "sha256-27J1Y3+tbZK7RX+63xVV2eaX/LF525vBR3Ff9EYDEl0="; 11 + sha256 = "1chw56khx5akjxkq0vwrw9ryjpyc3fzdmksh496llc513l01hpkl"; 12 12 }; 13 13 14 14 buildInputs = [ ponyc ];
-25
pkgs/development/compilers/ponyc/pony-stable.nix
··· 1 - {lib, stdenv, fetchFromGitHub, ponyc }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "pony-stable"; 5 - version = "0.2.2"; 6 - 7 - src = fetchFromGitHub { 8 - owner = "ponylang"; 9 - repo = "pony-stable"; 10 - rev = version; 11 - sha256 = "0nzvsqvl315brp3yb4j5kl82xnkmib4jk416jjc7yrz4k3jgr278"; 12 - }; 13 - 14 - buildInputs = [ ponyc ]; 15 - 16 - installFlags = [ "prefix=${placeholder "out"}" "install" ]; 17 - 18 - meta = { 19 - description = "A simple dependency manager for the Pony language"; 20 - homepage = "https://www.ponylang.org"; 21 - license = lib.licenses.bsd2; 22 - maintainers = with lib.maintainers; [ dipinhora kamilchm patternspandemic ]; 23 - platforms = lib.platforms.unix; 24 - }; 25 - }
-1
pkgs/top-level/all-packages.nix
··· 12821 12821 }; 12822 12822 12823 12823 pony-corral = callPackage ../development/compilers/ponyc/pony-corral.nix { }; 12824 - pony-stable = callPackage ../development/compilers/ponyc/pony-stable.nix { }; 12825 12824 12826 12825 qbe = callPackage ../development/compilers/qbe { }; 12827 12826