1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 21:11:34 +03:00
mobile-nixos/examples/hello/app/default.nix
2020-05-31 18:54:07 -04:00

30 lines
505 B
Nix

{ stdenv
, lib
, mruby
}:
stdenv.mkDerivation {
name = "hello-gui.mrb";
src = lib.cleanSource ./.;
nativeBuildInputs = [
mruby
];
buildPhase = ''
mrbc -g -o app.mrb \
$(find ${../../../boot/gui/lib} -type f -name '*.rb' | sort) \
$(find ./lib -type f -name '*.rb' | sort) \
$(find ./windows -type f -name '*.rb' | sort) \
main.rb
'';
installPhase = ''
mkdir -p $out/libexec/
mv -v app.mrb $out/libexec/
mkdir -p $out/share/hello-gui
'';
}