-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathflake.nix
More file actions
52 lines (45 loc) · 1.57 KB
/
flake.nix
File metadata and controls
52 lines (45 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nitro-util.url = "github:monzo/aws-nitro-util";
nitro-util.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nitro-util, nixpkgs, flake-utils, ... }: (flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nitro = nitro-util.lib.${system};
in
{
packages = {
# the EIFs below will be for your machine's architecture
shellScriptEif = pkgs.callPackage ./withShellScript.nix {
inherit nitro;
};
yourOwnInitEif = pkgs.callPackage ./withYourInit.nix {
inherit nitro;
};
yourOwnKernelEif = pkgs.callPackage ./bringYourOwnKernel.nix {
inherit nitro;
};
# the EIFs below will be for the architecture in the package name,
# even if you build from a different machine
x86_64-linux-crossCompiledEif =
let
crossArch = "x86_64";
crossPkgs = import nixpkgs { inherit system; crossSystem = "${crossArch}-linux"; };
in
crossPkgs.callPackage ./withCrossCompilation.nix {
inherit crossArch nitro;
};
aarch64-linux-crossCompiledEif =
let
crossArch = "aarch64";
crossPkgs = import nixpkgs { inherit system; crossSystem = "${crossArch}-linux"; };
in
crossPkgs.callPackage ./withCrossCompilation.nix {
inherit crossArch nitro;
};
};
}));
}