You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

flake.nix 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. epoch = 201909;
  3. description = "A collection of packages for the Nix package manager";
  4. outputs = { self }:
  5. let
  6. lib = import ./lib;
  7. jobs = import ./pkgs/top-level/release.nix { nixpkgs = self; };
  8. localSystems = [ "x86_64-linux" ];
  9. forAllSystems = f: lib.genAttrs localSystems (system: f system);
  10. natives = forAllSystems (system: import ./. { inherit system; });
  11. crossSystems = [ "x86_64-genode" ];
  12. forAllCrossSystems = f:
  13. with builtins;
  14. let
  15. f' = localSystem: crossSystem:
  16. let system = localSystem + "-" + crossSystem;
  17. in {
  18. name = system;
  19. value = f { inherit system localSystem crossSystem; };
  20. };
  21. list = lib.lists.crossLists f' [ localSystems crossSystems ];
  22. in listToAttrs list;
  23. crossPairs = forAllCrossSystems ({ system, localSystem, crossSystem }:
  24. import ./. {
  25. inherit localSystem crossSystem;
  26. config.allowUnsupportedSystem = localSystem != crossSystem;
  27. });
  28. in {
  29. lib = lib // { inherit forAllSystems forAllCrossSystems; };
  30. legacyPackages = natives // crossPairs;
  31. };
  32. }