summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2017-01-08 10:31:34 +0100
committerMoritz Ulrich <moritz@tarn-vedra.de>2017-01-08 16:55:36 +0100
commit7435fefd26f27b14e6b3c6820a51cb7c499bd8d6 (patch)
treedbd540109687841f02e24b3490e79c3df921d0cc /pkgs/development/compilers
parent2a2e8e906b7ceac2c5c76ab85b9b565665e81053 (diff)
downloadnixlib-7435fefd26f27b14e6b3c6820a51cb7c499bd8d6.tar
nixlib-7435fefd26f27b14e6b3c6820a51cb7c499bd8d6.tar.gz
nixlib-7435fefd26f27b14e6b3c6820a51cb7c499bd8d6.tar.bz2
nixlib-7435fefd26f27b14e6b3c6820a51cb7c499bd8d6.tar.lz
nixlib-7435fefd26f27b14e6b3c6820a51cb7c499bd8d6.tar.xz
nixlib-7435fefd26f27b14e6b3c6820a51cb7c499bd8d6.tar.zst
nixlib-7435fefd26f27b14e6b3c6820a51cb7c499bd8d6.zip
rustc: Disable fragile tcp tests on Darwin
This is an alternative implementation of
https://github.com/NixOS/nixpkgs/pull/21741/files
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/rust/default.nix2
-rw-r--r--pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch36
2 files changed, 37 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index 4d9668da2e33..7b8d5a3d1ef7 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -4,7 +4,6 @@
 let
   rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}));
 in
-
 rec {
   rustc = callPackage ./rustc.nix {
     shortVersion = "1.14";
@@ -16,6 +15,7 @@ rec {
 
     patches = [
       ./patches/disable-lockfile-check-stable.patch
+      ./patches/darwin-disable-fragile-tcp-tests.patch
     ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
 
     inherit targets;
diff --git a/pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch b/pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch
new file mode 100644
index 000000000000..5c51886b4d83
--- /dev/null
+++ b/pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch
@@ -0,0 +1,36 @@
+From 0becb0b7cff0176279fc9f94c91299d788a43941 Mon Sep 17 00:00:00 2001
+From: Moritz Ulrich <moritz@tarn-vedra.de>
+Date: Sun, 8 Jan 2017 10:28:17 +0100
+Subject: [PATCH] Disable libstd::net::tcp::{ttl, timeouts} on Darwin
+
+---
+ src/libstd/net/tcp.rs | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs
+index 0e7c5b0671..189c31b958 100644
+--- a/src/libstd/net/tcp.rs
++++ b/src/libstd/net/tcp.rs
+@@ -1022,7 +1022,10 @@ mod tests {
+ 
+     // FIXME: re-enabled bitrig/openbsd tests once their socket timeout code
+     //        no longer has rounding errors.
+-    #[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)]
++  #[cfg_attr(any(target_os = "bitrig",
++                 target_os = "netbsd",
++                 target_os = "openbsd",
++                 target_os = "macos"), ignore)]
+     #[test]
+     fn timeouts() {
+         let addr = next_test_ip4();
+@@ -1101,6 +1104,7 @@ mod tests {
+         assert_eq!(false, t!(stream.nodelay()));
+     }
+ 
++    #[cfg_attr(target_os = "macos", ignore)]
+     #[test]
+     fn ttl() {
+         let ttl = 100;
+-- 
+2.11.0
+