2020-06-27 00:36:36 +03:00
|
|
|
{ runCommand
|
2020-05-29 06:10:01 +03:00
|
|
|
, lib
|
|
|
|
, mruby
|
|
|
|
}:
|
|
|
|
|
2020-06-27 00:36:36 +03:00
|
|
|
# mkDerivation will append something like -aarch64-unknown-linux-gnu to the
|
|
|
|
# derivation name with cross, which will break the mruby code loading.
|
|
|
|
# Since we don't need anything from mkDerivation, really, let's use runCommand.
|
|
|
|
runCommand "boot-gui.mrb" {
|
2020-05-29 06:10:01 +03:00
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
mruby
|
|
|
|
];
|
2020-06-27 00:36:36 +03:00
|
|
|
} ''
|
|
|
|
mrbc \
|
|
|
|
-o $out \
|
|
|
|
$(find $src/lib -type f -name '*.rb' | sort) \
|
|
|
|
$src/main.rb
|
|
|
|
''
|