git.iko.soy/typeable/nixpkgs
on master help sign in
mruby: Removes a test that fails in the sandbox.
commit53bfb47e1d2e4ae81c915a6b6d0f14012c1e5f1f authorSamuel Dionne-Riel <samuel@dionne-riel.com> dateThu 9 Aug 2018, 19:12 (8 years ago) parentf847155
2 files changed+42
pkgs/development/compilers/mruby/0001-Disables-IO-isatty-test-for-sandboxed-builds.patch+36 pkgs/development/compilers/mruby/default.nix+6
pkgs/development/compilers/mruby/0001-Disables-IO-isatty-test-for-sandboxed-builds.patchnew file+36
@@ -0,0 +1,36 @@
1+From f3db284516105fd30b5513a5528104574a7b8545 Mon Sep 17 00:00:00 2001
2+From: Samuel Dionne-Riel <samuel@dionne-riel.com>
3+Date: Thu, 9 Aug 2018 19:07:45 -0400
4+Subject: [PATCH] Disables `IO#isatty` test for sandboxed builds.
5+
6+---
7+ mrbgems/mruby-io/test/io.rb | 13 -------------
8+ 1 file changed, 13 deletions(-)
9+
10+diff --git a/mrbgems/mruby-io/test/io.rb b/mrbgems/mruby-io/test/io.rb
11+index e06b1499..e8a54736 100644
12+--- a/mrbgems/mruby-io/test/io.rb
13++++ b/mrbgems/mruby-io/test/io.rb
14+@@ -342,19 +342,6 @@ assert('IO#_read_buf') do
15+ io.closed?
16+ end
17+
18+-assert('IO#isatty') do
19+- skip "isatty is not supported on this platform" if MRubyIOTestUtil.win?
20+- f1 = File.open("/dev/tty")
21+- f2 = File.open($mrbtest_io_rfname)
22+-
23+- assert_true f1.isatty
24+- assert_false f2.isatty
25+-
26+- f1.close
27+- f2.close
28+- true
29+-end
30+-
31+ assert('IO#pos=, IO#seek') do
32+ fd = IO.sysopen $mrbtest_io_rfname
33+ io = IO.new fd
34+--
35+2.16.4
36+
pkgs/development/compilers/mruby/default.nix+6
@@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
1111 sha256 = "0pw72acbqgs4n1qa297nnja23v9hxz9g7190yfx9kwm7mgbllmww";
1212 };
1313
14+ patches = [
15+ ./0001-Disables-IO-isatty-test-for-sandboxed-builds.patch
16+ ];
17+
1418 nativeBuildInputs = [ ruby bison ];
1519
1620 # Necessary so it uses `gcc` instead of `ld` for linking.
@@ -22,6 +26,8 @@ stdenv.mkDerivation rec {
2226 cp -R build/host/{bin,lib} $out
2327 '';
2428
29+ doCheck = true;
30+
2531 meta = with stdenv.lib; {
2632 description = "An embeddable implementation of the Ruby language";
2733 homepage = https://mruby.org;