Emery Hemingway 4 months ago
parent
commit
2033bd8af1
  1. 7
      flake.nix
  2. 1
      nixos-modules/base-hw-pc.nix
  3. 1
      nixos-modules/base-hw-virt_qemu.nix
  4. 4
      nixos-modules/file-systems.nix
  5. 5
      nixos-modules/genode-core.nix
  6. 2
      nixos-modules/genode-init.nix
  7. 7
      nixos-modules/gui/default.nix
  8. 2
      nixos-modules/hardware/ahci.nix
  9. 2
      nixos-modules/hardware/default.nix
  10. 1
      nixos-modules/nova.nix
  11. 1
      nixos-modules/qemu-vm.nix
  12. 4
      nixos-modules/services/tor.nix
  13. 15
      overlay/default.nix
  14. 1
      overlay/llvm-11/default.nix
  15. 2
      packages/default.nix
  16. 6
      packages/genodelabs/default.nix
  17. 2
      packages/genodelabs/toolchain.nix
  18. 2
      tests/bash.nix
  19. 2
      tests/default.nix
  20. 2
      tests/graphics.nix
  21. 2
      tests/lib/build-vms.nix
  22. 2
      tests/log.nix
  23. 4
      tests/nim.nix
  24. 2
      tests/tor.nix

7
flake.nix

@ -89,9 +89,8 @@
let
pkg' = prev.getOutput output pkg;
path' = "${pkg'}/${output}/${file}";
erisInfo =
fromJSON (builtins.unsafeDiscardStringContext
(readFile "${pkg'}/nix-support/eris-manifest.json"));
erisInfo = fromJSON (builtins.unsafeDiscardStringContext
(readFile "${pkg'}/nix-support/eris-manifest.json"));
caps = filter ({ path, ... }: path == path')
(prev.attrsets.mapAttrsToList (path:
{ cap, closure }: {
@ -214,7 +213,7 @@
# Genode native packages, not packages in the traditional
# sense in that these cannot be installed within a profile.
forAllCrossSystems ({ system, localSystem, crossSystem }:
nixpkgs.lib.filterAttrs (n: v: v != null)
nixpkgs.lib.filterAttrs (_: v: v != null)
self.legacyPackages.${system}.genodePackages);
devShell =

1
nixos-modules/base-hw-pc.nix

@ -2,7 +2,6 @@
with lib;
let
localPackages = pkgs.buildPackages;
utils = import ../lib {
inherit (config.nixpkgs) system localSystem crossSystem;
inherit pkgs;

1
nixos-modules/base-hw-virt_qemu.nix

@ -2,7 +2,6 @@
with lib;
let
localPackages = pkgs.buildPackages;
utils = import ../lib {
inherit (config.nixpkgs) system localSystem crossSystem;
inherit pkgs;

4
nixos-modules/file-systems.nix

@ -27,7 +27,7 @@ with lib; {
};
fileSystems = lib.mkOption {
type = types.attrsOf (types.submodule ({ name, config, ... }: {
type = types.attrsOf (types.submodule {
options.block = {
device = lib.mkOption { type = types.int; };
@ -37,7 +37,7 @@ with lib; {
partition = lib.mkOption { type = types.ints.positive; };
};
}));
});
};
};

5
nixos-modules/genode-core.nix

@ -230,8 +230,7 @@ in {
}];
genode.core.romModules = with builtins;
let getBin = name: "${getAttr name pkgs.genodePackages}/bin/${name}";
in listToAttrs (lib.lists.flatten
listToAttrs (lib.lists.flatten
((map (getAttr "roms") (attrValues children')) ++ (map
({ cap, path, ... }: {
name = cap;
@ -269,7 +268,7 @@ in {
# Create the tarball of the store to live in core ROM
system.build.tarball =
pkgs.callPackage "${modulesPath}/../lib/make-system-tarball.nix" {
extraInputs = lib.attrsets.mapAttrsToList (name: child: child.package)
extraInputs = lib.attrsets.mapAttrsToList (_: child: child.package)
config.genode.init.children;
contents = erisContents;
compressCommand = "cat";

2
nixos-modules/genode-init.nix

@ -96,7 +96,7 @@ in {
(map (label: ''
, { service =
{ name = "Nic"
, label = Sigil.Init.LabelSelector.prefix "${child}"
, label = Sigil.Init.LabelSelector.prefix "${child} -> ${label}"
}
, route = Sigil.Init.Route.parent (None Text)
}

7
nixos-modules/gui/default.nix

@ -3,13 +3,6 @@
let
toDhall = lib.generators.toDhall { };
cfg = config.genode.gui;
domains' = lib.attrsets.mapAttrsToList (mapKey: attrs: {
inherit mapKey;
mapValue = lib.attrsets.mapAttrsToList
(mapKey: mapValue: { inherit mapKey mapValue; }) attrs;
}) cfg.domains;
in {
options.genode.gui = {
enable = lib.mkEnableOption "Genode Gui service";

2
nixos-modules/hardware/ahci.nix

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;

2
nixos-modules/hardware/default.nix

@ -20,8 +20,6 @@ in {
};
config = let
cfg = config.hardware.genode;
deviceManagerEnable = cfg.ahci.enable || cfg.usb.enable;
ahciEris = lib.getEris "bin" pkgs.genodePackages.ahci_drv;

1
nixos-modules/nova.nix

@ -2,7 +2,6 @@
with lib;
let
localPackages = pkgs.buildPackages;
utils = import ../lib {
inherit (config.nixpkgs) system localSystem crossSystem;
inherit pkgs;

1
nixos-modules/qemu-vm.nix

@ -18,7 +18,6 @@ let
else
throw "No EFI firmware available for platform";
efiFirmware = "${efiPrefix}_CODE.fd";
efiVarsDefault = "${efiPrefix}_VARS.fd";
# Shell script to start the VM.
startVM = ''

4
nixos-modules/services/tor.nix

@ -1,8 +1,6 @@
{ config, lib, pkgs, ... }:
let
toDhall = lib.generators.toDhall { };
cfg = config.services.tor;
let toDhall = lib.generators.toDhall { };
in {
config = lib.mkIf config.services.tor.enable {

15
overlay/default.nix

@ -9,9 +9,6 @@ let
overrideHost = attrs: drv:
if hostPlatform.isGenode then drv.override attrs else drv;
overrideTarget = attrs: drv:
if targetPlatform.isGenode then drv.override attrs else drv;
overrideAttrsHost = f: drv:
if hostPlatform.isGenode then drv.overrideAttrs f else drv;
@ -24,8 +21,8 @@ let
addPatchesTarget = ps: overrideAttrsTarget (addPatches' ps);
autoreconfHost = overrideAttrsHost
(attrs: { nativeBuildInputs = [ final.autoreconfHook ]; });
autoreconfHost =
overrideAttrsHost (_: { nativeBuildInputs = [ final.autoreconfHook ]; });
nullPkgs =
# Nullify these packages to find problems early.
@ -72,7 +69,7 @@ in nullPkgs // {
coreutils = overrideHost {
gmp = null;
libiconv = null;
} (overrideAttrsHost (attrs: {
} (overrideAttrsHost (_: {
configureFlags = [
"--disable-acl"
"--disable-largefile"
@ -188,7 +185,7 @@ in nullPkgs // {
nimblePackages =
# Packages from the Nimble flake with adjustments.
let pkgs' = flake.inputs.nimble.overlay (final // pkgs') final;
in pkgs'.nimblePackages.extend (final: prev: {
in pkgs'.nimblePackages.extend (_: prev: {
genode = prev.genode.overrideAttrs (attrs: rec {
version = "20.11.1";
@ -225,7 +222,7 @@ in nullPkgs // {
rsync = overrideHost {
enableACLs = false;
popt = null;
} (overrideAttrsHost (attrs: { outputs = [ "out" "man" ]; }) rsync);
} (overrideAttrsHost (_: { outputs = [ "out" "man" ]; }) rsync);
solo5-tools = callPackage ./solo5-tools { };
@ -254,7 +251,7 @@ in nullPkgs // {
zstd = let
static = true;
legacySupport = false;
in overrideAttrsHost (attrs: rec {
in overrideAttrsHost (_: rec {
cmakeFlags = lib.attrsets.mapAttrsToList
(name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
BUILD_SHARED = !static;

1
overlay/llvm-11/default.nix

@ -8,7 +8,6 @@ let
release_version = "11.0.0";
version =
release_version; # differentiating these (variables) is important for RCs
targetConfig = stdenv.targetPlatform.config;
fetch = name: sha256:
fetchurl {

2
packages/default.nix

@ -4,7 +4,7 @@ let
upstream = import ./genodelabs { inherit flake pkgs; };
inherit (upstream) genodeSources;
inherit (pkgs) buildPackages callPackage fetchFromGitHub fetchgit stdenv;
inherit (pkgs) buildPackages callPackage fetchFromGitHub;
dhallPackages =
flake.inputs.nixpkgs.legacyPackages.x86_64-linux.callPackage ./dhall { };

6
packages/genodelabs/default.nix

@ -1,7 +1,7 @@
{ flake, pkgs }:
let
inherit (pkgs) lib buildPackages targetPackages;
inherit (pkgs) lib buildPackages;
platform = pkgs.targetPlatform;
@ -207,8 +207,8 @@ let
# to their inputs. The Genode depot mechanism links programs and
# libraries to facsimilie stub libraries which are not guaranteed
# to have the same ABI as the current version as the real library.
{ name, apiOnly ? false, portInputs ? [ ], depotInputs ? [ ]
, nativeBuildInputs ? [ ], buildInputs ? [ ], meta ? { }, ... }@extraAttrs:
{ name, portInputs ? [ ], depotInputs ? [ ], nativeBuildInputs ? [ ]
, buildInputs ? [ ], meta ? { }, ... }@extraAttrs:
let
getDepotInputs = lib.concatMap (x:

2
packages/genodelabs/toolchain.nix

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

2
tests/bash.nix

@ -1,6 +1,6 @@
{
name = "bash";
machine = { config, lib, modulesPath, pkgs, ... }:
machine = { lib, pkgs, ... }:
let toDhall = lib.generators.toDhall { };
in {
genode.init.children.bash = let

2
tests/default.nix

@ -2,8 +2,6 @@
let
lib = flake.lib;
nixpkgs = flake.legacyPackages.${system};
legacyPackages = flake.legacyPackages.${system};
testingPython =
# Mostly lifted from Nixpkgs.

2
tests/graphics.nix

@ -1,6 +1,6 @@
{
name = "graphics";
machine = { config, lib, pkgs, ... }: {
machine = { pkgs, ... }: {
genode.gui.consoleLog.enable = true;

2
tests/lib/build-vms.nix

@ -18,7 +18,7 @@ rec {
# hostname and `configX' is a NixOS system configuration. Each
# machine is given an arbitrary IP address in the virtual network.
buildVirtualNetwork = nodes:
let nodesOut = mapAttrs (n: buildVM nodesOut) (assignIPAddresses nodes);
let nodesOut = mapAttrs (_: buildVM nodesOut) (assignIPAddresses nodes);
in nodesOut;
buildVM = nodes: configurations:

2
tests/log.nix

@ -1,6 +1,6 @@
{
name = "log";
machine = { lib, pkgs, ... }: {
machine = { pkgs, ... }: {
genode.init.children.log = {
package = pkgs.genodePackages.test-log;

4
tests/nim.nix

@ -1,6 +1,6 @@
{
name = "nim";
machine = { pkgs, lib, ... }: {
machine = { pkgs, ... }: {
genode.init.children.test_nim = let
testNim = with pkgs;
stdenv.mkDerivation {
@ -45,7 +45,7 @@
}
, config = Libc.toConfig Libc.default
}
'';
'';
};
};

2
tests/tor.nix

@ -1,6 +1,6 @@
{
name = "tor";
machine = { config, lib, pkgs, ... }: {
machine = {
documentation.nixos = {
enable = true;

Loading…
Cancel
Save