Merge pull request #238276 from marsam/refactor-mruby

mruby: refactor and adopt
This commit is contained in:
Mario Rodas 2023-07-01 20:00:58 -05:00 committed by GitHub
commit 77e0148455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, stdenv, ruby, bison, rake, fetchFromGitHub }:
{ lib, stdenv, ruby, rake, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "mruby";
@ -11,10 +11,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-MmrbWeg/G29YBvVrOtceTOZChrQ2kx9+apl7u7BiGjA=";
};
nativeBuildInputs = [ ruby bison rake ];
nativeBuildInputs = [ rake ];
nativeCheckInputs = [ ruby ];
# 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";
installPhase = ''
@ -24,19 +26,13 @@ stdenv.mkDerivation rec {
doCheck = true;
checkPhase = ''
runHook preCheck
rake test
runHook postCheck
'';
checkTarget = "test";
meta = with lib; {
description = "An embeddable implementation of the Ruby language";
homepage = "https://mruby.org";
maintainers = [ maintainers.nicknovitski ];
maintainers = with maintainers; [ nicknovitski marsam ];
license = licenses.mit;
platforms = platforms.unix;
platforms = platforms.all;
};
}