Browse Source

Add genode-make app

A demonstration of invoking a flake function from within an app.
llvm-10
Emery Hemingway 2 years ago
parent
commit
ad07de94bf
  1. 8
      README.md
  2. 5
      apps/default.nix
  3. 6
      apps/genode-make/default.nix
  4. 5
      apps/genode-make/make.nix

8
README.md

@ -193,6 +193,14 @@ nix build .#checks.x86_64-linux-x86_64-genode.nova-solo5-net.xml
nix build .#checks.x86_64-linux-x86_64-genode.nova-solo5-net.sotest
```
# Tips and tricks
## Build a Genode Labs Make target
```shell
nix app genodepkgs#genode-make "test/bomb"
```
# Glossary
Some of terms that follow are necessary for understanding packaging methodology,

5
apps/default.nix

@ -43,6 +43,11 @@ let
in dhallApps // {
genode-make = {
type = "app";
program = nixpkgs.buildPackages.callPackage ./genode-make { };
};
linux-image = let
drv = import ./linux-image {
apps = self;

6
apps/genode-make/default.nix

@ -0,0 +1,6 @@
{ writeScriptBin, runtimeShell }:
writeScriptBin "genode-make" ''
#!${runtimeShell}
exec nix build -f ${./make.nix} --argstr target $@
'' + "/bin/genode-make"

5
apps/genode-make/make.nix

@ -0,0 +1,5 @@
{ target }:
let
flake = getFlake "genodepkgs";
pkgs = flake.packages."${builtins.currentSystem}-x86_64-genode";
in pkgs.genodeSources.make target
Loading…
Cancel
Save