summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2018-08-09 19:12:34 -0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2018-08-10 19:07:20 -0400
commit53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f (patch)
tree5b7f2478cf874b558de021db527055de78776e44 /pkgs/development/compilers
parentf84715501453f17a481a918e45b33ad426d0be14 (diff)
downloadnixlib-53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f.tar
nixlib-53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f.tar.gz
nixlib-53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f.tar.bz2
nixlib-53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f.tar.lz
nixlib-53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f.tar.xz
nixlib-53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f.tar.zst
nixlib-53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f.zip
mruby: Removes a test that fails in the sandbox.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/mruby/0001-Disables-IO-isatty-test-for-sandboxed-builds.patch36
-rw-r--r--pkgs/development/compilers/mruby/default.nix6
2 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/compilers/mruby/0001-Disables-IO-isatty-test-for-sandboxed-builds.patch b/pkgs/development/compilers/mruby/0001-Disables-IO-isatty-test-for-sandboxed-builds.patch
new file mode 100644
index 000000000000..779391fc62a9
--- /dev/null
+++ b/pkgs/development/compilers/mruby/0001-Disables-IO-isatty-test-for-sandboxed-builds.patch
@@ -0,0 +1,36 @@
+From f3db284516105fd30b5513a5528104574a7b8545 Mon Sep 17 00:00:00 2001
+From: Samuel Dionne-Riel <samuel@dionne-riel.com>
+Date: Thu, 9 Aug 2018 19:07:45 -0400
+Subject: [PATCH] Disables `IO#isatty` test for sandboxed builds.
+
+---
+ mrbgems/mruby-io/test/io.rb | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/mrbgems/mruby-io/test/io.rb b/mrbgems/mruby-io/test/io.rb
+index e06b1499..e8a54736 100644
+--- a/mrbgems/mruby-io/test/io.rb
++++ b/mrbgems/mruby-io/test/io.rb
+@@ -342,19 +342,6 @@ assert('IO#_read_buf') do
+   io.closed?
+ end
+ 
+-assert('IO#isatty') do
+-  skip "isatty is not supported on this platform" if MRubyIOTestUtil.win?
+-  f1 = File.open("/dev/tty")
+-  f2 = File.open($mrbtest_io_rfname)
+-
+-  assert_true  f1.isatty
+-  assert_false f2.isatty
+-
+-  f1.close
+-  f2.close
+-  true
+-end
+-
+ assert('IO#pos=, IO#seek') do
+   fd = IO.sysopen $mrbtest_io_rfname
+   io = IO.new fd
+-- 
+2.16.4
+
diff --git a/pkgs/development/compilers/mruby/default.nix b/pkgs/development/compilers/mruby/default.nix
index be3064884793..3ab553678b6c 100644
--- a/pkgs/development/compilers/mruby/default.nix
+++ b/pkgs/development/compilers/mruby/default.nix
@@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
     sha256  = "0pw72acbqgs4n1qa297nnja23v9hxz9g7190yfx9kwm7mgbllmww";
   };
 
+  patches = [
+    ./0001-Disables-IO-isatty-test-for-sandboxed-builds.patch
+  ];
+
   nativeBuildInputs = [ ruby bison ];
 
   # Necessary so it uses `gcc` instead of `ld` for linking.
@@ -22,6 +26,8 @@ stdenv.mkDerivation rec {
     cp -R build/host/{bin,lib} $out
   '';
 
+  doCheck = true;
+
   meta = with stdenv.lib; {
     description = "An embeddable implementation of the Ruby language";
     homepage = https://mruby.org;