summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorPascal Wittmann <mail@pascal-wittmann.de>2018-08-11 09:36:34 +0200
committerPascal Wittmann <mail@pascal-wittmann.de>2018-08-11 09:36:34 +0200
commita34579e01ef2aca4b33381a5c189746a1b52e2f0 (patch)
tree70410891f5c55611a2d17d2d723f270ad022c391 /pkgs/development/compilers
parentaf8cd3c74e80ff532b17568039ecc4f143992813 (diff)
parent40dea2488fec71f6224944c1b9dae280c2fcc2dc (diff)
downloadnixlib-a34579e01ef2aca4b33381a5c189746a1b52e2f0.tar
nixlib-a34579e01ef2aca4b33381a5c189746a1b52e2f0.tar.gz
nixlib-a34579e01ef2aca4b33381a5c189746a1b52e2f0.tar.bz2
nixlib-a34579e01ef2aca4b33381a5c189746a1b52e2f0.tar.lz
nixlib-a34579e01ef2aca4b33381a5c189746a1b52e2f0.tar.xz
nixlib-a34579e01ef2aca4b33381a5c189746a1b52e2f0.tar.zst
nixlib-a34579e01ef2aca4b33381a5c189746a1b52e2f0.zip
Merge branch 'master' into add-missing-licenses
 Conflicts:
	pkgs/tools/networking/network-manager/fortisslvpn.nix
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/mosml/default.nix29
-rw-r--r--pkgs/development/compilers/mruby/0001-Disables-IO-isatty-test-for-sandboxed-builds.patch36
-rw-r--r--pkgs/development/compilers/mruby/default.nix38
3 files changed, 103 insertions, 0 deletions
diff --git a/pkgs/development/compilers/mosml/default.nix b/pkgs/development/compilers/mosml/default.nix
new file mode 100644
index 000000000000..5ea3f63ccd18
--- /dev/null
+++ b/pkgs/development/compilers/mosml/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, gmp, perl }:
+
+stdenv.mkDerivation rec {
+  name = "mosml-${version}";
+  version = "2.10.1";
+
+  buildInputs = [ gmp perl ];
+
+  makeFlags = "PREFIX=$(out)";
+
+  src = fetchurl {
+    url = "https://github.com/kfl/mosml/archive/ver-${version}.tar.gz";
+    sha256 = "13x7wj94p0inn84pzpj52dch5s9lznqrj287bd3nk3dqd0v3kmgy";
+  };
+
+  setSourceRoot = ''export sourceRoot="$(echo */src)"'';
+
+  meta = with stdenv.lib; {
+    description = "A light-weight implementation of Standard ML";
+    longDescription = ''
+      Moscow ML is a light-weight implementation of Standard ML (SML), a strict
+      functional language used in teaching and research.
+    '';
+    homepage = http://mosml.org/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ vaibhavsagar ];
+  };
+}
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
new file mode 100644
index 000000000000..3ab553678b6c
--- /dev/null
+++ b/pkgs/development/compilers/mruby/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, ruby, bison, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "mruby-${version}";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    owner   = "mruby";
+    repo    = "mruby";
+    rev     = version;
+    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.
+  # https://github.com/mruby/mruby/blob/35be8b252495d92ca811d76996f03c470ee33380/tasks/toolchains/gcc.rake#L25
+  preBuild = if stdenv.isLinux then "unset LD" else null;
+
+  installPhase = ''
+    mkdir $out
+    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;
+    maintainers = [ maintainers.nicknovitski ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}