Make devShell a Genode Labs FHS environment

This commit is contained in:
Emery Hemingway 2020-03-20 17:57:17 +05:30
parent 085fedfef5
commit 918c74a111
5 changed files with 44 additions and 9 deletions

View File

@ -207,6 +207,14 @@ echo ./config.dhall | nix app genodepkgs#render-init > config.xml
nix app genodepkgs#genode-make "test/bomb"
```
## Enter an environment compatible with the Genode Labs build scripts
```shell
nix dev-shell genodepkgs
cd $GENODE_DIR
make -C build/x86_64 run/bomb
```
# Glossary
Some of terms that follow are necessary for understanding packaging methodology,

View File

@ -38,13 +38,13 @@
},
"nixpkgsUpstream": {
"info": {
"lastModified": 1584464280,
"narHash": "sha256-ovYhaoANbsuIRik2zOe5Sxhn0eu5PnExP4IhAJxRUW0="
"lastModified": 1584695415,
"narHash": "sha256-qIofBjFM7MZLyKrUq3rCauF8GpAsqKfIzzVX2hDA0a4="
},
"locked": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7806df1e5f5d49864d917497a4cd2f5ec1a359f8",
"rev": "a08d4f605bca62c282ce9955d5ddf7d824e89809",
"type": "github"
},
"original": {

View File

@ -32,11 +32,37 @@
depot = thisSystem genode-depot.packages;
};
devShell = legacyPackages.mkShell {
nativeBuildInputs = [
nixpkgs.legacyPackages.${localSystem}.dhall
packages.dhallGenode
];
devShell = let
pkgs = nixpkgsUpstream.legacyPackages.x86_64-linux;
fhs = pkgs.buildFHSUserEnv {
name = "genode-env";
targetPkgs = pkgs:
(with pkgs; [
binutils
bison
expect
flex
git
glibc.dev
gnumake
libxml2
qemu
tcl
which
xorriso
]);
runScript = "bash";
extraBuildCommands = let
toolchain = pkgs.fetchzip {
url = "file:///" + packages.genodeSources.toolchain.src;
hash = "sha256-26rPvLUPEJm40zLSqTquwuFTJ1idTB0T4VXgaHRN+4o=";
};
in "ln -s ${toolchain}/local usr/local";
};
in pkgs.stdenv.mkDerivation {
name = "genode-fhs-shell";
nativeBuildInputs = [ fhs ];
shellHook = "exec genode-env";
};
apps = import ./apps {

View File

@ -152,6 +152,7 @@ in {
targets = [ target ];
} // attrs);
inherit ports;
toolchain = sourceForgeToolchain;
};
}

View File

@ -70,6 +70,6 @@ let
wrapped = wrapCC cc;
wrapped' = wrapped.overrideAttrs (attrs: { inherit (cc) targetPrefix; });
wrapped' = wrapped.overrideAttrs (attrs: { inherit (cc) src targetPrefix; });
in wrapped'