Skip to content

Commit

Permalink
Merge pull request #173 from samueldr-wip/fix/aarch64-boot-menu
Browse files Browse the repository at this point in the history
boot/gui: Fix cross-compilation breakage
  • Loading branch information
samueldr committed Jun 26, 2020
2 parents 89d31e5 + 9f50617 commit e689208
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions boot/gui/default.nix
@@ -1,24 +1,20 @@
{ stdenv
{ runCommand
, lib
, mruby
}:

stdenv.mkDerivation {
name = "boot-gui.mrb";

# 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" {
src = lib.cleanSource ./.;

nativeBuildInputs = [
mruby
];

buildPhase = ''
mrbc -g -o gui.mrb \
$(find lib -type f -name '*.rb' | sort) \
main.rb
'';

installPhase = ''
mv -v gui.mrb $out
'';
}
} ''
mrbc \
-o $out \
$(find $src/lib -type f -name '*.rb' | sort) \
$src/main.rb
''

0 comments on commit e689208

Please sign in to comment.