1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-24 00:12:13 +03:00
mobile-nixos/boot/init/default.nix

33 lines
659 B
Nix
Raw Normal View History

2019-12-22 06:23:25 +03:00
{ fetchurl, mruby, mrbgems }:
2019-12-21 08:38:27 +03:00
2019-12-22 06:23:25 +03:00
let
ruby_rev = "37457117c941b700b150d76879318c429599d83f";
shellwords = fetchurl {
name = "shellwords.rb";
url = "https://raw.githubusercontent.com/ruby/ruby/${ruby_rev}/lib/shellwords.rb";
sha256 = "197g7qvrrijmajixa2h9c4jw26l36y8ig6qjb5d43qg4qykhqfcx";
};
in
2019-12-21 08:38:27 +03:00
mruby.builder {
pname = "mobile-nixos-init";
version = "0.0-unstable";
src = ./.;
2019-12-22 06:23:25 +03:00
postPatch = ''
cp ${shellwords} lib/0001_shellwords.rb
'';
2019-12-21 08:38:27 +03:00
buildPhase = ''
makeBin init main.rb
'';
gems = with mrbgems; [
{ core = "mruby-io"; }
{ core = "mruby-sleep"; }
mruby-regexp-pcre
mruby-env
mruby-open3
];
}