3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/mruby/default.nix

37 lines
942 B
Nix
Raw Normal View History

2020-06-26 10:48:35 +01:00
{ stdenv, ruby, bison, rake, fetchFromGitHub }:
2018-08-09 21:24:56 +01:00
stdenv.mkDerivation rec {
2019-05-13 03:27:38 +01:00
pname = "mruby";
2020-06-26 10:48:35 +01:00
version = "2.1.1";
2018-08-09 21:24:56 +01:00
src = fetchFromGitHub {
owner = "mruby";
repo = "mruby";
rev = version;
2020-06-26 10:48:35 +01:00
sha256 = "gEEb0Vn/G+dNgeY6r0VP8bMSPrEOf5s+0GoOcnIPtEU=";
2018-08-09 21:24:56 +01:00
};
2020-06-26 10:48:35 +01:00
nativeBuildInputs = [ ruby bison rake ];
2018-08-09 21:24:56 +01:00
2020-06-26 10:48:18 +01:00
patches = [ ./bison-36-compat.patch ];
# 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;
2018-08-09 21:24:56 +01:00
installPhase = ''
mkdir $out
cp -R build/host/{bin,lib} $out
'';
doCheck = true;
2018-08-09 21:24:56 +01:00
meta = with stdenv.lib; {
description = "An embeddable implementation of the Ruby language";
homepage = "https://mruby.org";
2018-08-09 21:24:56 +01:00
maintainers = [ maintainers.nicknovitski ];
license = licenses.mit;
platforms = platforms.unix;
};
}