-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
84 lines (83 loc) · 2.27 KB
/
Copy pathflake.nix
File metadata and controls
84 lines (83 loc) · 2.27 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
crane.url = "github:ipetkov/crane";
};
outputs =
inputs@{
flake-parts,
crane,
nixpkgs,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } (
{ flake-parts-lib, ... }:
let
inherit (flake-parts-lib) importApply;
ukci.default = importApply ./nix/ukci.nix {
inherit nixpkgs crane;
};
in
{
imports = [
ukci.default
];
systems = [
"x86_64-linux"
"aarch64-linux"
"riscv64-linux"
];
perSystem =
{
self',
lib,
pkgs,
system,
...
}:
let
defaultShell = pkgs.mkShell {
name = "Development Shell";
packages =
[
pkgs.clang
pkgs.libclang
pkgs.libelf
pkgs.libbpf
pkgs.llvm
pkgs.nixfmt
pkgs.pkg-config
pkgs.zlib
self'.packages.ukci
self'.packages.run-qemu
self'.packages.test-qemu
];
};
in
{
packages.default = self'.packages.ttyrecall;
devShells.default = defaultShell;
devShells.extended = pkgs.mkShell {
inputsFrom = [ defaultShell ];
packages =
lib.optionals (system != "aarch64-linux") [
self'.packages.ukci-aarch64
self'.packages.run-qemu-aarch64
self'.packages.test-qemu-aarch64
]
++ lib.optionals (system != "x86_64-linux") [
self'.packages.ukci-x86_64
self'.packages.run-qemu-x86_64
self'.packages.test-qemu-x86_64
]
++ lib.optionals (system != "riscv64-linux") [
self'.packages.ukci-riscv64
self'.packages.run-qemu-riscv64
self'.packages.test-qemu-riscv64
];
};
};
}
);
}