Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 38 lines 987 B view raw
1{ stdenv, ruby, bison, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 name = "mruby-${version}"; 5 version = "2.0.0"; 6 7 src = fetchFromGitHub { 8 owner = "mruby"; 9 repo = "mruby"; 10 rev = version; 11 sha256 = "1r6w1asjshff43ymdwa6xmrkggza99mi2kw88k7ic6ag2j81hcj5"; 12 }; 13 14 patches = [ 15 ./0001-Disables-IO-isatty-test-for-sandboxed-builds.patch 16 ]; 17 18 nativeBuildInputs = [ ruby bison ]; 19 20 # Necessary so it uses `gcc` instead of `ld` for linking. 21 # https://github.com/mruby/mruby/blob/35be8b252495d92ca811d76996f03c470ee33380/tasks/toolchains/gcc.rake#L25 22 preBuild = if stdenv.isLinux then "unset LD" else null; 23 24 installPhase = '' 25 mkdir $out 26 cp -R build/host/{bin,lib} $out 27 ''; 28 29 doCheck = true; 30 31 meta = with stdenv.lib; { 32 description = "An embeddable implementation of the Ruby language"; 33 homepage = https://mruby.org; 34 maintainers = [ maintainers.nicknovitski ]; 35 license = licenses.mit; 36 platforms = platforms.unix; 37 }; 38}