Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from samueldr-wip/fix/aarch64-boot-menu
boot/gui: Fix cross-compilation breakage
- Loading branch information
Showing
1 changed file
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
'' |