Make sure we can use nix cache for non-cross-compiling
This commit is contained in:
parent
3a3bd56295
commit
1180540ce3
21
flake.lock
21
flake.lock
@ -1,25 +1,6 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"root": {
|
"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": "root",
|
||||||
"version": 7
|
"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";
|
description = "cryptic-net provides the foundation for an autonomous community cloud infrastructure";
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self, utils,
|
self,
|
||||||
}: let
|
}: let
|
||||||
|
|
||||||
supportedSystems = (import ./nix/pkgs.nix).supportedSystems;
|
supportedSystems = (import ./nix/pkgs.nix).supportedSystems;
|
||||||
|
17
nix/pkgs.nix
17
nix/pkgs.nix
@ -45,9 +45,18 @@ rec {
|
|||||||
default = {
|
default = {
|
||||||
buildSystem,
|
buildSystem,
|
||||||
hostSystem ? buildSystem,
|
hostSystem ? buildSystem,
|
||||||
}: import src {
|
}: import src ({
|
||||||
system = buildSystem;
|
|
||||||
crossSystem.config = hostSystem;
|
|
||||||
inherit overlays;
|
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;
|
||||||
|
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user