Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hello.nix 681B

12345678910111213141516171819202122232425262728
  1. {
  2. name = "hello";
  3. machine = { pkgs, ... }:
  4. let
  5. hello = pkgs.stdenv.mkDerivation {
  6. name = "hello";
  7. dontUnpack = true;
  8. buildPhase = ''
  9. cat > hello.c << EOF
  10. #include <stdio.h>
  11. int main(int argc, char **argv) { printf("hello world!\n"); return 0; }
  12. EOF
  13. $CC hello.c -o hello
  14. '';
  15. installPhase = "install -Dt $out/bin hello";
  16. };
  17. in {
  18. genode.init.children.hello = {
  19. configFile = ./hello.dhall;
  20. inputs = [ hello ];
  21. };
  22. };
  23. testScript = ''
  24. start_all()
  25. machine.wait_until_serial_output("child \"init\" exited with exit value 0")
  26. '';
  27. }