Update README to refer to flakes
This commit is contained in:
parent
1a33ea2f3a
commit
4df8ba5a63
46
README.md
46
README.md
|
@ -1,45 +1,19 @@
|
||||||
# An overlayed Nixpkgs for the Genode OS framework
|
# Genode Packages
|
||||||
|
|
||||||
This repo contains Nix expressions for building Genode with Nixpkgs and building
|
This repo contains Nix expressions for building Genode with Nixpkgs and building
|
||||||
Nixpkgs for Genode. At the moment the former is experimental and broken in many
|
Nixpkgs for Genode. At the moment the former is experimental and broken in many
|
||||||
cases, the later is probably broken for all cases.
|
cases, the later is probably broken for all cases.
|
||||||
|
|
||||||
|
Furthermore, this repository is structured as a Nim flake, with is in itself an
|
||||||
|
experimental extension of the Nix utility.
|
||||||
|
|
||||||
## Toolchain
|
## Toolchain
|
||||||
|
|
||||||
The LLVM cross-compiler may useful already, Clang apparently builds Genode
|
The LLVM cross-compiler may useful already, Clang apparently builds trivial
|
||||||
without serious problems. Bootstrapping GCC is not feasible.
|
Genode componenents without serious problems. Bootstrapping GCC is not practical
|
||||||
|
due to the recursive autotools build system.
|
||||||
|
|
||||||
To compiler environment may be accessed via the `nix-shell` utility and the
|
To compiler environment for x86_64 may be accessed by invoking `nix devShell`.
|
||||||
`genode.base` attribute defined here.
|
|
||||||
|
|
||||||
```sh
|
Bootstrapping the environment on a laptop can take hours. Get yourself a
|
||||||
nix-shell «path-to-this-repo» -A genode.base
|
[Hydra](https://nixos.org/hydra/).
|
||||||
```
|
|
||||||
|
|
||||||
Bootstrapping the environment on a laptop can take hours.
|
|
||||||
|
|
||||||
## Continuous builds
|
|
||||||
|
|
||||||
### C3D2 hydra
|
|
||||||
|
|
||||||
Hardware for continuous builds provided by [Chaos Computer Club Dresden](https://c3d2.de/).
|
|
||||||
|
|
||||||
The first hydra is located at https://hydra.hq.c3d2.de/project/genodepkgs.
|
|
||||||
|
|
||||||
The following NixOS module will enable use of this Hydra as a cache:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ ... }: {
|
|
||||||
nix = {
|
|
||||||
trustedUsers = [ «your-user» ];
|
|
||||||
|
|
||||||
trustedBinaryCaches = [
|
|
||||||
"https://nix-serve.hq.c3d2.de"
|
|
||||||
];
|
|
||||||
|
|
||||||
binaryCachePublicKeys = [
|
|
||||||
"nix-serve.hq.c3d2.de:FEi9GyFkou1Ua8INaEKmuGaww9E5y3XwrNGNRfKYeLo="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
|
@ -51,12 +51,17 @@
|
||||||
x86_64-linux.nixos =
|
x86_64-linux.nixos =
|
||||||
let pkgs' = nixpkgs.legacyPackages.x86_64-linux // { };
|
let pkgs' = nixpkgs.legacyPackages.x86_64-linux // { };
|
||||||
in import ./nixos/test.nix {
|
in import ./nixos/test.nix {
|
||||||
|
inherit self;
|
||||||
nixpkgs = nixpkgs.outPath;
|
nixpkgs = nixpkgs.outPath;
|
||||||
genodepkgs = self.packages.x86_64-linux-x86_64-genode;
|
genodepkgs = self.packages.x86_64-linux-x86_64-genode;
|
||||||
depot = genode-depot.packages.x86_64-linux-x86_64-genode;
|
depot = genode-depot.packages.x86_64-linux-x86_64-genode;
|
||||||
} { system = "x86_64-linux"; };
|
} { system = "x86_64-linux"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModule = import ./nixos;
|
nixosModule = import ./nixos;
|
||||||
|
|
||||||
|
devShell.x86_64-linux = self.packages.x86_64-linux-x86_64-genode.stdenv;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
{ nixpkgs, genodepkgs, depot }:
|
{ self, nixpkgs, genodepkgs, depot }:
|
||||||
|
|
||||||
import (nixpkgs + "/nixos/tests/make-test.nix") ({ pkgs, ... }:
|
import (nixpkgs + "/nixos/tests/make-test.nix") ({ pkgs, ... }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
name = "genode-base-linux";
|
name = "genode-base-linux";
|
||||||
|
|
||||||
machine = { pkgs, ... }:
|
machine =
|
||||||
|
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./. ];
|
imports = [ "${self.outPath}/nixos" ];
|
||||||
genode.signal-test = {
|
genode = {
|
||||||
|
signal-test = {
|
||||||
config = ''
|
config = ''
|
||||||
<config>
|
<config>
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
|
@ -37,6 +40,7 @@ import (nixpkgs + "/nixos/tests/make-test.nix") ({ pkgs, ... }:
|
||||||
rom = { "test-signal" = "${genodepkgs.os}/bin/test-signal"; };
|
rom = { "test-signal" = "${genodepkgs.os}/bin/test-signal"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
$machine->waitUntilSucceeds("journalctl -u signal-test | grep -q -i -- '--- Signalling test finished ---'");
|
$machine->waitUntilSucceeds("journalctl -u signal-test | grep -q -i -- '--- Signalling test finished ---'");
|
||||||
|
|
Loading…
Reference in New Issue