mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 19:23:01 +03:00
cross-canary: Review for static builds
This commit is contained in:
parent
3ca606f27d
commit
d0a26ebfa6
@ -1,6 +1,8 @@
|
||||
{ stdenv, runCommandNoCC, runtimeShell, busybox, hello-mruby, pkgsBuildBuild, pkgsStatic }:
|
||||
{ stdenv, runCommandNoCC, runtimeShell, busybox, hello, hello-mruby, pkgsBuildBuild, mruby, mrbgems }:
|
||||
|
||||
let
|
||||
static = stdenv.hostPlatform.isStatic;
|
||||
|
||||
inherit (stdenv) system;
|
||||
emulators = {
|
||||
"aarch64-linux" = "qemu-aarch64";
|
||||
@ -22,28 +24,39 @@ let
|
||||
# Everything went okay, mark the build as a success!
|
||||
touch $out
|
||||
'';
|
||||
|
||||
# Enables a couple mrbgems that are known to be fickle.
|
||||
mrubyWithGems = mruby.override({
|
||||
gems = with mrbgems; [
|
||||
mruby-file-stat
|
||||
];
|
||||
});
|
||||
in
|
||||
|
||||
# We're not creating a "useless" canary when there is no cross compilation.
|
||||
if stdenv.buildPlatform == stdenv.hostPlatform then {} else
|
||||
if stdenv.buildPlatform == stdenv.hostPlatform then {} else (
|
||||
# We're not creating known-failing static builds.
|
||||
(if static then {} else
|
||||
{
|
||||
runtimeShell = mkTest "runtimeShell" ''
|
||||
${emulator} ${runtimeShell} -c 'echo runtimeShell works...'
|
||||
'';
|
||||
}) // {
|
||||
busybox = mkTest "busybox" ''
|
||||
# Checks that busybox works
|
||||
${emulator} ${busybox}/bin/busybox uname -a
|
||||
${emulator} ${busybox}/bin/busybox sh -c 'echo busybox works...'
|
||||
'';
|
||||
|
||||
hello = mkTest "hello" ''
|
||||
${emulator} ${hello}/bin/hello
|
||||
'';
|
||||
|
||||
mruby = mkTest "mruby" ''
|
||||
# Checks that mruby works at its most basic.
|
||||
${emulator} ${hello-mruby}/bin/hello
|
||||
'';
|
||||
|
||||
runtimeShell = mkTest "runtimeShell" ''
|
||||
# And what about runtimeShell?
|
||||
${emulator} ${runtimeShell} -c 'echo runtimeShell works...'
|
||||
'';
|
||||
|
||||
static-mruby = mkTest "static-mruby" ''
|
||||
${emulator} ${pkgsStatic.hello-mruby}/bin/hello
|
||||
mruby-with-gems = mkTest "mruby-with-gems" ''
|
||||
${emulator} ${mrubyWithGems}/bin/mruby --version
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user