cross-canary: Review for static builds
-{ 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...'
'';
- mruby = mkTest "mruby" ''
- # Checks that mruby works at its most basic.
- ${emulator} ${hello-mruby}/bin/hello
+ hello = mkTest "hello" ''
+ ${emulator} ${hello}/bin/hello
'';
- runtimeShell = mkTest "runtimeShell" ''
- # And what about runtimeShell?
- ${emulator} ${runtimeShell} -c 'echo runtimeShell works...'
+ mruby = mkTest "mruby" ''
+ ${emulator} ${hello-mruby}/bin/hello
'';
- static-mruby = mkTest "static-mruby" ''
- ${emulator} ${pkgsStatic.hello-mruby}/bin/hello
+ mruby-with-gems = mkTest "mruby-with-gems" ''
+ ${emulator} ${mrubyWithGems}/bin/mruby --version
'';
}
+)
