-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
109 lines (87 loc) · 3.56 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
103
104
105
106
107
108
109
{
description = "Multipath TCP related software";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
mptcpanalyzer-python.url = "github:teto/pymptcpanalyzer";
mptcp-pm.url = "github:teto/mptcp-pm";
mptcpanalyzer-haskell.url = "github:teto/mptcpanalyzer";
linux-kernel-mptcp = {
url = "github:teto/linux/mptcp_95_enable_on_localhost";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" ]
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
config = {
allowUnfree = true;
allowBroken = true;
allowAliases = false;
};
};
in
{
packages = {
default = self.packages.${system}.mptcpanalyzer;
mptcpanalyzer = self.inputs.mptcpanalyzer-python.packages.${system}.mptcpanalyzer;
# TODO fix
# mptcpanalyzer = mptcpanalyzer-haskell
# mptcp-pm = inputs.mptcp-pm.packages."${system}".mptcp-pm;
iproute-mptcp = pkgs.callPackage ./pkgs/iproute-mptcp { };
inherit (pkgs) mptcpd mptcpnumerics mptcpplot mptcptrace iperf3-mptcp linux_mptcp_96;
inherit (pkgs) protocol;
};
})
// {
nixosModules = rec {
default = mptcp;
mptcp = (import ./modules/mptcp);
};
overlays.default = final: prev: {
net-tools = prev.callPackage ./pkgs/net-tools { };
patch_enable_mptcp_on_localhost = { name = "enable_on_localhost"; patch = ./pkgs/linux-mptcp/enable_on_localhost.patch; };
mptcpd = prev.callPackage ./pkgs/mptcpd { };
linux_mptcp_96 = final.callPackage ./pkgs/linux-mptcp/96.nix {
# final.patch_enable_mptcp_on_localhost
kernelPatches = [ ];
};
# TODO should be either updated or bound to an older nixpkgs
# my fork with several patches
# one of them enables mptcp on localhost
# linux_mptcp_95-matt = (final.linux_mptcp_95.override ({
# # src = self.inputs.linux-kernel-mptcp;
# mptcpVersion = "0.95.2";
# modDirVersion = "5.1.0";
# })).overrideAttrs (oa: {
# src = final.fetchFromGitHub {
# owner = "teto";
# repo = "linux";
# rev = "4e5027564537dfc77768dfda090cfb060b090551"; # branch mptcp_95_enable_on_localhost
# sha256 = "sha256-sKgRTTmetM4EFuiKEU8mD+yJuI/PwV62HqaMSKInXvw=";
# };
# # modDirVersion 4.19.126 specified in the Nix expression is wrong, it should be:
# });
# linux_mptcp_95 = final.callPackage ./pkgs/linux-mptcp/95.nix {
# kernelPatches = final.linux_4_19.kernelPatches;
# };
linux_mptcp_net_next = final.callPackage ./pkgs/linux-net-next.nix { };
mptcptrace = final.callPackage ./pkgs/mptcptrace { };
mptcpplot = final.callPackage ./pkgs/mptcpplot { };
protocol = final.python3Packages.callPackage ./pkgs/protocol { };
mptcpnumerics = final.python3Packages.callPackage ./pkgs/mptcpnumerics.nix { };
iperf3-mptcp = final.iperf3.overrideAttrs (oa: {
src = final.fetchFromGitHub {
owner = "pabeni";
repo = "iperf";
rev = "26b066b9d4e92442d55950689dbd9fd101b429a7";
sha256 = "sha256-Z2i93sRVp8KgNPY58Mme3MfYx8QdhcQZ/Z95TWl6nMc=";
};
});
};
};
}