-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
102 lines (96 loc) · 3.4 KB
/
flake.nix
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
inputs = {
# gnuradio 3.7 has last been supported in nixos 21.11
nixpkgs-2111.url = github:NixOS/nixpkgs/nixos-21.11;
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
utils = {
url = "github:numtide/flake-utils";
};
tetra-kit-player = {
url = "github:marenz2569/tetra-kit-player";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "utils";
};
tetra-receiver = {
url = "github:marenz2569/tetra-receiver";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "utils";
};
};
outputs = { self, nixpkgs, nixpkgs-2111, utils, tetra-kit-player, tetra-receiver, ... }:
utils.lib.eachSystem [ "x86_64-linux" ]
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-2111 = import nixpkgs-2111 {
inherit system;
config.permittedInsecurePackages = [
"python2.7-Pillow-6.2.2"
"python2.7-urllib3-1.26.2"
];
};
osmo-tetra = pkgs.callPackage ./pkgs/osmo-tetra.nix { };
tetra-kit-decoder = pkgs.callPackage ./pkgs/tetra-kit-decoder.nix { };
tetra-kit-recorder = pkgs.callPackage ./pkgs/tetra-kit-recorder.nix { };
tetra-codec = pkgs.callPackage ./pkgs/tetra-codec.nix { };
in
rec {
checks = packages;
devShells = {
osmo-tetra = import ./pkgs/shell-osmo-tetra.nix { pkgs = pkgs-2111; inherit osmo-tetra; };
osmo-tetra-tmux = import ./pkgs/shell-osmo-tetra.nix { pkgs = pkgs-2111; inherit osmo-tetra; shellHook = true; };
tetra-kit = import ./pkgs/shell-tetra-kit.nix { inherit pkgs; inherit tetra-kit-decoder; inherit tetra-kit-recorder;};
tetra-kit-tmux = import ./pkgs/shell-tetra-kit.nix { inherit pkgs; inherit tetra-kit-decoder; inherit tetra-kit-recorder; shellHook = true; };
speech-decode-notebook = import ./pkgs/shell-speech-decode-notebook.nix { inherit pkgs; inherit tetra-codec; };
};
packages = {
osmo-tetra = osmo-tetra;
tetra-kit-decoder = tetra-kit-decoder;
tetra-kit-recorder = tetra-kit-recorder;
tetra-codec = tetra-codec;
default = osmo-tetra;
};
}
) // {
overlays.default = final: prev: {
inherit (self.packages."x86_64-linux")
tetra-kit-decoder tetra-kit-recorder;
};
nixosModules = {
tetra-kit = {
imports = [
./nixos-modules/tetra-kit.nix
];
nixpkgs.overlays = [
self.overlays.default
];
};
tetra = {
imports = [
self.nixosModules.tetra-kit
tetra-kit-player.nixosModules.default
tetra-receiver.nixosModules.default
./nixos-modules/tetra.nix
];
};
default = self.nixosModules.tetra;
};
hydraJobs =
let
hydraSystems = [ "x86_64-linux" ];
in
builtins.foldl'
(hydraJobs: system:
builtins.foldl'
(hydraJobs: pkgName:
nixpkgs.lib.recursiveUpdate hydraJobs {
${pkgName}.${system} = self.packages.${system}.${pkgName};
}
)
hydraJobs
(builtins.attrNames self.packages.${system})
)
{ }
hydraSystems;
};
}