2
0
Fork 0
genodepkgs/packages/default.nix

91 lines
2.3 KiB
Nix

# SPDX-License-Identifier: CC0-1.0
{ nixpkgs }:
let
inherit (nixpkgs)
buildPackages callPackage fetchFromGitHub fetchgit genodeSources stdenv;
inherit (genodeSources) buildUpstream;
dhallPackages = buildPackages.callPackage ./dhall { };
buildWorld = let
genodeWorld = fetchFromGitHub {
owner = "genodelabs";
repo = "genode-world";
rev = "0ed545e55a90c39df23a86eb733961de71d56241";
hash = "sha256-sirmUtLmZ5YnfLKrOvOBafnZW3UW+1LtkiGu85Ma820=";
};
in attrs:
genodeSources.buildUpstream (attrs // {
postConfigure =
"echo REPOSITORIES += ${genodeWorld} >> build/etc/build.conf";
});
genodeTupRules = ./Tuprules.tup;
in rec {
inherit stdenv genodeSources;
base-hw-pc = buildUpstream {
name = "base-hw-pc";
outputs = [ "out" "coreObj" "bootstrapObj" ];
KERNEL = "hw";
BOARD = "pc";
targets = [ "bootstrap" "core" "timer" "lib/ld" ];
postInstall = ''
mv $out/core-hw-pc.o $coreObj
mv $out/bootstrap-hw-pc.o $bootstrapObj
mv $out/ld-hw.lib.so $out/ld.lib.so
mv $out/hw_timer_drv $out/timer_drv
'';
};
base-linux = buildUpstream {
name = "base-linux";
KERNEL = "linux";
targets = [ "core" "timer" "lib/ld" ];
postInstall = ''
mkdir -p $out/lib
mv $out/ld-linux.lib.so $out/lib/ld.lib.so
mv $out/linux_timer_drv $out/timer_drv
'';
HOST_INC_DIR = buildPackages.glibc.dev + "/include";
};
base-nova = buildUpstream {
name = "base-nova";
outputs = [ "out" "coreObj" ];
KERNEL = "nova";
targets = [ "core" "timer" "lib/ld" ];
postInstall = ''
mv $out/core-nova.o $coreObj
mv $out/ld-nova.lib.so $out/ld.lib.so
mv $out/nova_timer_drv $out/timer_drv
'';
};
init = genodeSources.make "init";
bender = buildPackages.callPackage ./bender { };
block_router = callPackage ./block_router { };
dhallGenode = dhallPackages.genode;
nic_bus = callPackage ./nic_bus { };
NOVA = callPackage ./NOVA { };
ssh_client = buildWorld {
name = "ssh_client";
targets = [ "app/ssh_client" ];
portInputs = with genodeSources.ports; [ libc libssh openssl zlib ];
};
solo5 = let drv = callPackage ./solo5 { };
in drv // { tests = drv.tests // { pname = "solo5-tests"; }; };
sotest-producer = callPackage ./sotest-producer { };
}