summary refs log tree commit diff
path: root/pkgs/development/libraries/libsnark
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-02-09 14:00:48 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2019-04-26 21:54:32 -0400
commit0fe315c9b6080cd75f92fea1f97714b04abb4315 (patch)
treef2a52f2c91ed36e62e354681d76ef1495b66615a /pkgs/development/libraries/libsnark
parent5fad67d3614a84118068e8657e894cc913e2325f (diff)
downloadnixpkgs-0fe315c9b6080cd75f92fea1f97714b04abb4315.tar
nixpkgs-0fe315c9b6080cd75f92fea1f97714b04abb4315.tar.gz
nixpkgs-0fe315c9b6080cd75f92fea1f97714b04abb4315.tar.bz2
nixpkgs-0fe315c9b6080cd75f92fea1f97714b04abb4315.tar.lz
nixpkgs-0fe315c9b6080cd75f92fea1f97714b04abb4315.tar.xz
nixpkgs-0fe315c9b6080cd75f92fea1f97714b04abb4315.tar.zst
nixpkgs-0fe315c9b6080cd75f92fea1f97714b04abb4315.zip
treewide: remove old patches for macOS
These shouldn’t be needed now that we are on macOS 10.12.
Diffstat (limited to 'pkgs/development/libraries/libsnark')
-rw-r--r--pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch41
-rw-r--r--pkgs/development/libraries/libsnark/default.nix2
2 files changed, 0 insertions, 43 deletions
diff --git a/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch b/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch
deleted file mode 100644
index 2eee84d1c4b..00000000000
--- a/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Adapted from https://github.com/zcash/libsnark/pull/10
-
-diff --git a/depends/libff/libff/common/profiling.cpp b/depends/libff/libff/common/profiling.cpp
-index f2a1985..319149c 100755
---- a/depends/libff/libff/common/profiling.cpp
-+++ b/depends/libff/libff/common/profiling.cpp
-@@ -27,6 +27,13 @@
- #include <proc/readproc.h>
- #endif
- 
-+#ifdef __MACH__
-+#include <time.h>
-+#include <sys/time.h>
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+#endif
-+
- namespace libff {
- 
- long long get_nsec_time()
-@@ -42,10 +49,20 @@ long long get_nsec_cpu_time()
- 	return 0;
- #else
-     ::timespec ts;
-+#ifdef __MACH__
-+    clock_serv_t cclock;
-+    mach_timespec_t mts;
-+    host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
-+    clock_get_time(cclock, &mts);
-+    mach_port_deallocate(mach_task_self(), cclock);
-+    ts.tv_sec = mts.tv_sec;
-+    ts.tv_nsec = mts.tv_nsec;
-+#else
-     if ( ::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) )
-         throw ::std::runtime_error("clock_gettime(CLOCK_PROCESS_CPUTIME_ID) failed");
-         // If we expected this to work, don't silently ignore failures, because that would hide the problem and incur an unnecessarily system-call overhead. So if we ever observe this exception, we should probably add a suitable #ifdef .
-         //TODO: clock_gettime(CLOCK_PROCESS_CPUTIME_ID) is not supported by native Windows. What about Cygwin? Should we #ifdef on CLOCK_PROCESS_CPUTIME_ID or on __linux__?
-+#endif
-     return ts.tv_sec * 1000000000ll + ts.tv_nsec;
- #endif
- }
diff --git a/pkgs/development/libraries/libsnark/default.nix b/pkgs/development/libraries/libsnark/default.nix
index 4ea2209160f..15d8169f102 100644
--- a/pkgs/development/libraries/libsnark/default.nix
+++ b/pkgs/development/libraries/libsnark/default.nix
@@ -19,8 +19,6 @@ in stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  patches = [ ./darwin-fix-clock-gettime.patch ];
-
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {