mruby: refactor

- Remove bison from nativeBuildInputs, since it's only required to build
  parse.y

- Move ruby to nativeCheckInputs
This commit is contained in:
Mario Rodas 2023-06-17 04:20:00 +00:00
parent 70a87ecce0
commit 42bbff5424

View File

@ -1,4 +1,4 @@
{ lib, stdenv, ruby, bison, rake, fetchFromGitHub }: { lib, stdenv, ruby, rake, fetchFromGitHub }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mruby"; pname = "mruby";
@ -11,10 +11,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-MmrbWeg/G29YBvVrOtceTOZChrQ2kx9+apl7u7BiGjA="; sha256 = "sha256-MmrbWeg/G29YBvVrOtceTOZChrQ2kx9+apl7u7BiGjA=";
}; };
nativeBuildInputs = [ ruby bison rake ]; nativeBuildInputs = [ rake ];
nativeCheckInputs = [ ruby ];
# Necessary so it uses `gcc` instead of `ld` for linking. # Necessary so it uses `gcc` instead of `ld` for linking.
# https://github.com/mruby/mruby/blob/35be8b252495d92ca811d76996f03c470ee33380/tasks/toolchains/gcc.rake#L25 # https://github.com/mruby/mruby/blob/e502fd88b988b0a8d9f31b928eb322eae269c45a/tasks/toolchains/gcc.rake#L30
preBuild = "unset LD"; preBuild = "unset LD";
installPhase = '' installPhase = ''
@ -24,19 +26,13 @@ stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
checkPhase = '' checkTarget = "test";
runHook preCheck
rake test
runHook postCheck
'';
meta = with lib; { meta = with lib; {
description = "An embeddable implementation of the Ruby language"; description = "An embeddable implementation of the Ruby language";
homepage = "https://mruby.org"; homepage = "https://mruby.org";
maintainers = [ maintainers.nicknovitski ]; maintainers = [ maintainers.nicknovitski ];
license = licenses.mit; license = licenses.mit;
platforms = platforms.unix; platforms = platforms.all;
}; };
} }