Make devShell a Genode Labs FHS environment
This commit is contained in:
parent
085fedfef5
commit
918c74a111
|
@ -207,6 +207,14 @@ echo ./config.dhall | nix app genodepkgs#render-init > config.xml
|
||||||
nix app genodepkgs#genode-make "test/bomb"
|
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
|
# Glossary
|
||||||
|
|
||||||
Some of terms that follow are necessary for understanding packaging methodology,
|
Some of terms that follow are necessary for understanding packaging methodology,
|
||||||
|
|
|
@ -38,13 +38,13 @@
|
||||||
},
|
},
|
||||||
"nixpkgsUpstream": {
|
"nixpkgsUpstream": {
|
||||||
"info": {
|
"info": {
|
||||||
"lastModified": 1584464280,
|
"lastModified": 1584695415,
|
||||||
"narHash": "sha256-ovYhaoANbsuIRik2zOe5Sxhn0eu5PnExP4IhAJxRUW0="
|
"narHash": "sha256-qIofBjFM7MZLyKrUq3rCauF8GpAsqKfIzzVX2hDA0a4="
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7806df1e5f5d49864d917497a4cd2f5ec1a359f8",
|
"rev": "a08d4f605bca62c282ce9955d5ddf7d824e89809",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
36
flake.nix
36
flake.nix
|
@ -32,11 +32,37 @@
|
||||||
depot = thisSystem genode-depot.packages;
|
depot = thisSystem genode-depot.packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
devShell = legacyPackages.mkShell {
|
devShell = let
|
||||||
nativeBuildInputs = [
|
pkgs = nixpkgsUpstream.legacyPackages.x86_64-linux;
|
||||||
nixpkgs.legacyPackages.${localSystem}.dhall
|
fhs = pkgs.buildFHSUserEnv {
|
||||||
packages.dhallGenode
|
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 {
|
apps = import ./apps {
|
||||||
|
|
|
@ -152,6 +152,7 @@ in {
|
||||||
targets = [ target ];
|
targets = [ target ];
|
||||||
} // attrs);
|
} // attrs);
|
||||||
inherit ports;
|
inherit ports;
|
||||||
|
toolchain = sourceForgeToolchain;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,6 @@ let
|
||||||
|
|
||||||
wrapped = wrapCC cc;
|
wrapped = wrapCC cc;
|
||||||
|
|
||||||
wrapped' = wrapped.overrideAttrs (attrs: { inherit (cc) targetPrefix; });
|
wrapped' = wrapped.overrideAttrs (attrs: { inherit (cc) src targetPrefix; });
|
||||||
|
|
||||||
in wrapped'
|
in wrapped'
|
||||||
|
|
Loading…
Reference in New Issue