aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/turris-crossbuild.nix
blob: 1f107bd559931a7e261b385c3023f2140325a03e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ config, lib, pkgs, modulesPath, extendModules, ... }:

with lib;

let

  crossVariant = host: extendModules {
    modules = [{
      nixpkgs.system = host;
      nixpkgs.crossSystem = {
        inherit (config.nixpkgs.localSystem) system config;
      };
    }];
  };

in mkIf (config.nixpkgs.crossSystem == null) {

  # TODO for each common platform
  system.build.cross.x86_64-linux = crossVariant "x86_64-linux";

}