2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 12:14:10 +00:00
nixpkgs/pkgs/development/compilers/mruby/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
914 B
Nix
Raw Normal View History

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