Make sure we can use nix cache for non-cross-compiling

main
Brian Picciano 1 year ago
parent 3a3bd56295
commit 1180540ce3
  1. 21
      flake.lock
  2. 4
      flake.nix
  3. 15
      nix/pkgs.nix

@ -1,25 +1,6 @@
{
"nodes": {
"root": {
"inputs": {
"utils": "utils"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
"root": {}
},
"root": "root",
"version": 7

@ -1,10 +1,8 @@
{
inputs.utils.url = "github:numtide/flake-utils";
description = "cryptic-net provides the foundation for an autonomous community cloud infrastructure";
outputs = {
self, utils,
self,
}: let
supportedSystems = (import ./nix/pkgs.nix).supportedSystems;

@ -45,9 +45,18 @@ rec {
default = {
buildSystem,
hostSystem ? buildSystem,
}: import src {
}: import src ({
inherit overlays;
system = buildSystem;
} // (if buildSystem == hostSystem then {} else {
# The nixpkgs cache doesn't have any packages where cross-compiling has been
# enabled, even if the target platform is actually the same as the build
# platform (and therefore it's not really cross-compiling). So we only set
# up the cross-compiling config if the target platform is different.
crossSystem.config = hostSystem;
inherit overlays;
};
}));
}

Loading…
Cancel
Save