1 { lib, stdenv, ruby, bison, rake, fetchFromGitHub }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-C3K7ZooaOMa+V2HjxwiKxrrMb7ffl4QAgPsftRtb60c=";
14 nativeBuildInputs = [ ruby bison rake ];
16 # Necessary so it uses `gcc` instead of `ld` for linking.
17 # https://github.com/mruby/mruby/blob/35be8b252495d92ca811d76996f03c470ee33380/tasks/toolchains/gcc.rake#L25
18 preBuild = if stdenv.isLinux then "unset LD" else null;
22 cp -R include build/host/{bin,lib} $out
28 description = "An embeddable implementation of the Ruby language";
29 homepage = "https://mruby.org";
30 maintainers = [ maintainers.nicknovitski ];
31 license = licenses.mit;
32 platforms = platforms.unix;