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

33 lines
665 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 = ''
2019-12-22 06:23:45 +03:00
makeBin init lib/* main.rb
2019-12-21 08:38:27 +03:00
'';
gems = with mrbgems; [
{ core = "mruby-io"; }
{ core = "mruby-sleep"; }
mruby-regexp-pcre
mruby-env
mruby-open3
];
}