2
0
Fork 0

Refactor for clarity

Mode around for the sake of clarity, pin Nixpkgs with fetchGit for
convenience.
20.02
Emery Hemingway 3 years ago
parent db934b29d9
commit 734f38fabb
  1. 39
      default.nix
  2. 7
      dhall/default.nix
  3. 0
      toolchain-overlay/Genode.cmake
  4. 0
      toolchain-overlay/binutils.patch
  5. 0
      toolchain-overlay/clang.patch
  6. 0
      toolchain-overlay/compiler-rt.patch
  7. 0
      toolchain-overlay/default.nix
  8. 0
      toolchain-overlay/headers/default.nix
  9. 0
      toolchain-overlay/libc++.patch
  10. 0
      toolchain-overlay/libc/MB_CUR_MAX.patch
  11. 0
      toolchain-overlay/libc/_CurrentRuneLocale.patch
  12. 0
      toolchain-overlay/libc/cdefs_no_hidden.patch
  13. 0
      toolchain-overlay/libc/default.nix
  14. 0
      toolchain-overlay/libc/gdtoa.patch
  15. 0
      toolchain-overlay/libc/genode_rel.ld
  16. 0
      toolchain-overlay/libc/libc-builder.sh
  17. 0
      toolchain-overlay/libc/libc.pc.in
  18. 0
      toolchain-overlay/libc/libc.symbols
  19. 0
      toolchain-overlay/libc/log2.patch
  20. 0
      toolchain-overlay/libc/mktime.patch
  21. 0
      toolchain-overlay/libc/printfcommon.patch
  22. 0
      toolchain-overlay/libc/rcmd.patch
  23. 0
      toolchain-overlay/libc/res_init_c.patch
  24. 0
      toolchain-overlay/libc/runetype.patch
  25. 0
      toolchain-overlay/libc/semaphore.patch
  26. 0
      toolchain-overlay/libc/thread_local.patch
  27. 0
      toolchain-overlay/libc/types.patch
  28. 0
      toolchain-overlay/libc/vfwprintf_c_warn.patch
  29. 0
      toolchain-overlay/libc/xlocale.patch
  30. 0
      toolchain-overlay/libc/xlocale_private.patch
  31. 0
      toolchain-overlay/libc/xprintf_float.patch
  32. 0
      toolchain-overlay/llvm.patch
  33. 49
      upstream/default.nix

@ -1,23 +1,30 @@
{ nixpkgs ? import <nixpkgs> }:
with builtins;
let
nixpkgs' = nixpkgs {
config.allowUnsupportedSystem = true;
crossSystem = {
isx86_64 = true;
isGenode = true;
imports = [ ./platform.nix ];
pkgOverlay = self: super:
# Overlay of locally defined packages
{
genode = super.callPackage ./upstream { };
dhall = super.callPackage ./dhall { };
};
overlays = [ (import ./overlay) ];
};
in rec {
nixpkgs = nixpkgs';
toolchainOverlay = import ./toolchain-overlay;
# Overlay of toolchain patches
dhall = import ./dhall { inherit nixpkgs; };
nixpkgs' = builtins.fetchGit {
# A branch of Nixpkgs with a custom "crossSystem" mechanism
url = "https://github.com/ehmry/nixpkgs.git";
ref = "hybrid";
rev = "e4d734ace275cae70a776771d034c051956c9cab";
};
upstream = import ./upstream { inherit nixpkgs; };
in { nixpkgs ? import nixpkgs' }:
nixpkgs {
# Evaluate an overlayed Nixpkgs for a Genode target
config.allowUnsupportedSystem = true;
crossSystem = {
isx86_64 = true;
isGenode = true;
imports = [ ./platform.nix ];
};
overlays = [ toolchainOverlay pkgOverlay ];
}

@ -1,8 +1,7 @@
{ nixpkgs }:
{ callPackage }:
rec {
prelude = prelude_9_0_0;
prelude_9_0_0 = nixpkgs.callPackage ./prelude-9.0.0.nix {};
genode = nixpkgs.callPackage ./genode.nix {};
prelude_9_0_0 = callPackage ./prelude-9.0.0.nix { };
genode = callPackage ./genode.nix { };
}

@ -1,30 +1,34 @@
{ nixpkgs }:
{ stdenv, buildPackages, fetchgit, llvmPackages }:
let
inherit (nixpkgs.stdenv) lib targetPlatform;
specs = with targetPlatform;
[ ] ++ lib.optional is32bit "32bit" ++ lib.optional is64bit "64bit"
++ lib.optional isAarch32 "arm" ++ lib.optional isAarch64 "arm_64"
++ lib.optional isRiscV "riscv" ++ lib.optional isx86 "x86"
++ lib.optional isx86_32 "x86_32" ++ lib.optional isx86_64 "x86_64";
inherit (stdenv) lib targetPlatform;
specs = with targetPlatform; []
++ lib.optional is32bit "32bit"
++ lib.optional is64bit "64bit"
++ lib.optional isAarch32 "arm"
++ lib.optional isAarch64 "arm_64"
++ lib.optional isRiscV "riscv"
++ lib.optional isx86 "x86"
++ lib.optional isx86_32 "x86_32"
++ lib.optional isx86_64 "x86_64";
version = "19.07";
buildRepo = repo: nativeBuildInputs:
buildRepo = repo:
nixpkgs.stdenv.mkDerivation {
stdenv.mkDerivation {
name = "genode-${repo}-${version}";
outputs = [ "out" "dev" ];
inherit repo nativeBuildInputs specs version;
inherit repo specs version;
LIBCXX = nixpkgs.llvmPackages.libcxx;
LIBCXXABI = nixpkgs.llvmPackages.libcxxabi;
LIBUNWIND = nixpkgs.llvmPackages.libunwind;
HOST_LIBC = nixpkgs.buildPackages.glibc.dev;
HOST_LIBC = buildPackages.glibc.dev;
LIBCXX = llvmPackages.libcxx;
LIBCXXABI = llvmPackages.libcxxabi;
LIBUNWIND = llvmPackages.libunwind;
LIBUNWIND_BAREMETAL =
nixpkgs.llvmPackages.libunwind.override { isBaremetal = true; };
llvmPackages.libunwind.override { isBaremetal = true; };
src = nixpkgs.fetchgit {
src = fetchgit {
url = "https://git.sr.ht/~ehmry/genode";
rev = "d28abff776f94dc876662eb7dcdf5a6e81d26cc8";
sha256 = "1ibw27s352c2si22y209q17api8gaqv7qsh70vh4wk9bfv1kgchx";
@ -33,7 +37,7 @@ let
setupHook = ./../tool/setup-hooks.sh;
depsBuildBuild = with nixpkgs.buildPackages; [ llvm pkgconfig tup ];
depsBuildBuild = with buildPackages; [ llvm pkgconfig tup ];
configurePhase = ''
# Configure Tup
@ -94,8 +98,11 @@ let
};
in rec {
base = buildRepo "base" [ ];
base-linux = buildRepo "base-linux" [ base ];
base-nova = buildRepo "base-nova" [ base ];
os = buildRepo "os" [ base ];
base = buildRepo "base";
base-linux = (buildRepo "base-linux").overrideAttrs
(attrs: { nativeBuildInputs = [ base ]; });
base-nova = (buildRepo "base-nova").overrideAttrs
(attrs: { nativeBuildInputs = [ base ]; });
os =
(buildRepo "os").overrideAttrs (attrs: { nativeBuildInputs = [ base ]; });
}

Loading…
Cancel
Save