about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-06-05 23:25:47 +0200
committerGitHub <noreply@github.com>2021-06-05 23:25:47 +0200
commitcadb17b6ef579941d7c55a91ff4682193998dce5 (patch)
tree873ddbefa00631be5ea544b395cc04b5f3dcc7b1
parent6f386abdeeddc02a0af762839b86c6c92c2b9385 (diff)
parented22a2a78dba309b620c36d5fb11d5d4beb87456 (diff)
downloadnixlib-cadb17b6ef579941d7c55a91ff4682193998dce5.tar
nixlib-cadb17b6ef579941d7c55a91ff4682193998dce5.tar.gz
nixlib-cadb17b6ef579941d7c55a91ff4682193998dce5.tar.bz2
nixlib-cadb17b6ef579941d7c55a91ff4682193998dce5.tar.lz
nixlib-cadb17b6ef579941d7c55a91ff4682193998dce5.tar.xz
nixlib-cadb17b6ef579941d7c55a91ff4682193998dce5.tar.zst
nixlib-cadb17b6ef579941d7c55a91ff4682193998dce5.zip
Merge pull request #125432 from redvers/ponyc-0.41.1
ponyc: 0.38.3 -> 0.41.1
-rw-r--r--pkgs/development/compilers/ponyc/default.nix23
-rw-r--r--pkgs/development/compilers/ponyc/fix-libstdcpp-path.patch14
-rw-r--r--pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch10
-rw-r--r--pkgs/top-level/all-packages.nix2
4 files changed, 30 insertions, 19 deletions
diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix
index 9fc8188daa10..36a83d47d6fd 100644
--- a/pkgs/development/compilers/ponyc/default.nix
+++ b/pkgs/development/compilers/ponyc/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation (rec {
   pname = "ponyc";
-  version = "0.38.3";
+  version = "0.41.1";
 
   src = fetchFromGitHub {
     owner = "ponylang";
     repo = pname;
     rev = version;
-    sha256 = "14kivmyphi7gbd7mgd4cnsiwl4cl7wih8kwzh7n79s2s4c5hj4ak";
+    sha256 = "02wx070cy1193xzv58vh79yzwgpqiayqlwd3i285698fppbcg69a";
 
 # Due to a bug in LLVM 9.x, ponyc has to include its own vendored patched
 # LLVM.  (The submodule is a specific tag in the LLVM source tree).
@@ -23,34 +23,33 @@ stdenv.mkDerivation (rec {
     fetchSubmodules = true;
   };
 
-  ponygbenchmark = fetchurl {
-    url = "https://github.com/google/benchmark/archive/v1.5.0.tar.gz";
-    sha256 = "06i2cr4rj126m1zfz0x1rbxv1mw1l7a11mzal5kqk56cdrdicsiw";
-    name = "v1.5.0.tar.gz";
+  ponygbenchmark = fetchFromGitHub {
+    owner = "google";
+    repo = "benchmark";
+    rev = "v1.5.2";
+    sha256 = "13rxagpzw6bal6ajlmrxlh9kgfvcixn6j734b2bvfqz7lch8n0pa";
   };
 
   nativeBuildInputs = [ cmake makeWrapper which ];
   buildInputs = [ libxml2 z3 ];
-  propagatedBuildInputs = [ cc ];
 
   # Sandbox disallows network access, so disabling problematic networking tests
   patches = [
     ./disable-tests.patch
+    ./fix-libstdcpp-path.patch
     (substituteAll {
       src = ./make-safe-for-sandbox.patch;
       googletest = fetchurl {
         url = "https://github.com/google/googletest/archive/release-1.8.1.tar.gz";
         sha256 = "17147961i01fl099ygxjx4asvjanwdd446nwbq9v8156h98zxwcv";
-        name = "release-1.8.1.tar.gz";
       };
     })
   ];
 
   postUnpack = ''
     mkdir -p source/build/build_libs/gbenchmark-prefix/src
-    tar -C source/build/build_libs/gbenchmark-prefix/src -zxvf "$ponygbenchmark"
-    mv source/build/build_libs/gbenchmark-prefix/src/benchmark-1.5.0 \
-       source/build/build_libs/gbenchmark-prefix/src/benchmark
+    cp -r "$ponygbenchmark"/ source/build/build_libs/gbenchmark-prefix/src/benchmark
+    chmod -R u+w source/build/build_libs/gbenchmark-prefix/src/benchmark
   '';
 
   dontConfigure = true;
@@ -61,7 +60,6 @@ stdenv.mkDerivation (rec {
     patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2020-09-01-is-trivially-copyable.diff
     patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2020-01-07-01-c-exports.diff
     patch -d lib/llvm/src/ -p1 < lib/llvm/patches/2019-12-23-01-jit-eh-frames.diff
-
     substituteInPlace packages/process/_test.pony \
         --replace '"/bin/' '"${coreutils}/bin/' \
         --replace '=/bin' "${coreutils}/bin"
@@ -91,7 +89,6 @@ stdenv.mkDerivation (rec {
     + lib.optionalString stdenv.isDarwin "bits=64 "
     + lib.optionalString (stdenv.isDarwin && (!lto)) "lto=no "
     + '' install
-
     wrapProgram $out/bin/ponyc \
       --prefix PATH ":" "${stdenv.cc}/bin" \
       --set-default CC "$CC" \
diff --git a/pkgs/development/compilers/ponyc/fix-libstdcpp-path.patch b/pkgs/development/compilers/ponyc/fix-libstdcpp-path.patch
new file mode 100644
index 000000000000..63b0fa699129
--- /dev/null
+++ b/pkgs/development/compilers/ponyc/fix-libstdcpp-path.patch
@@ -0,0 +1,14 @@
+diff --git a/src/libponyc/CMakeLists.txt b/src/libponyc/CMakeLists.txt
+index bf2c385e..11d0d619 100644
+--- a/src/libponyc/CMakeLists.txt
++++ b/src/libponyc/CMakeLists.txt
+@@ -136,7 +136,7 @@ elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "DragonFly")
+ else()
+     # add a rule to generate the standalone library if needed
+     add_custom_command(OUTPUT libponyc-standalone.a
+-        COMMAND cp `find /usr/lib/ -name 'libstdc++.a' -print -quit` libstdcpp.a
++        COMMAND cp `${CMAKE_CXX_COMPILER} --print-file-name='libstdc++.a'` libstdcpp.a
+         COMMAND echo "create libponyc-standalone.a" > standalone.mri
+         COMMAND echo "addlib ${PROJECT_SOURCE_DIR}/../../build/libs/lib/libblake2.a" >> standalone.mri
+         COMMAND echo "addlib libstdcpp.a" >> standalone.mri
+
diff --git a/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch b/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch
index b07763a475d2..49addcbc616e 100644
--- a/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch
+++ b/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch
@@ -1,10 +1,10 @@
---- a/lib/CMakeLists.txt	2020-09-27 02:39:12.862940179 +0000
-+++ b/lib/CMakeLists.txt	2020-09-27 02:39:16.451957865 +0000
+--- a/lib/CMakeLists.txt	2021-05-27 15:58:36.819331229 -0400
++++ b/lib/CMakeLists.txt	2021-05-27 16:00:19.768268649 -0400
 @@ -10,12 +10,12 @@
  endif()
  
  ExternalProject_Add(gbenchmark
--    URL https://github.com/google/benchmark/archive/v1.5.0.tar.gz
+-    URL https://github.com/google/benchmark/archive/v1.5.2.tar.gz
 +    SOURCE_DIR gbenchmark-prefix/src/benchmark
      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
  )
@@ -30,12 +30,12 @@
 -        option(GIT_SUBMODULE "Check submodules during build" ON)
 -        if(GIT_SUBMODULE)
 -            message(STATUS "Updating submodules...")
--            execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+-            execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --depth 1
 -                            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 -                            RESULT_VARIABLE git_submod_result)
 -            #message("git_submod_result ${git_submod_result}")
 -            if(NOT git_submod_result EQUAL "0")
--                message(FATAL_ERROR "git submodule update --init --recursive failed with ${git_submod_result}, please checkout submodules")
+-                message(FATAL_ERROR "git submodule update --init --recursive --depth 1 failed with ${git_submod_result}, please checkout submodules")
 -            endif()
 -
 -            # we check to make sure the submodule hash matches
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d25f40e672e1..f9d82746ff12 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11663,7 +11663,7 @@ in
 
   ponyc = callPackage ../development/compilers/ponyc {
     # Upstream pony has dropped support for versions compiled with gcc.
-    stdenv = clangStdenv;
+    stdenv = llvmPackages_9.stdenv;
   };
 
   pony-corral = callPackage ../development/compilers/ponyc/pony-corral.nix { };