nixpkgs-suyu/pkgs/os-specific/linux/kernel/linux-mptcp.nix
Matthieu Coudron 38737386d5 linux_mptcp: makes linux_mptcp.override works
I needed to override some parameters because of an error I had:
"Error: modDirVersion specified in the Nix expression is wrong, it should be: 4.9.60+"

but the following override would not be taken into account
  pkg.override ({
    modDirVersion="4.9.60+";
    src=pkgs.lib.cleanSource /home/teto/mptcp;
  })

because the override would be overriden by the nixpkgs parameters
because of concatenation order:
https://nixos.org/nix/manual/#sec-language-operators
2017-11-13 11:19:26 +01:00

46 lines
1.2 KiB
Nix

{ stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
import ./generic.nix (rec {
mptcpVersion = "0.93";
modDirVersion = "4.9.60";
version = "${modDirVersion}-mptcp_v${mptcpVersion}";
extraMeta = {
branch = "4.4";
maintainers = with stdenv.lib.maintainers; [ teto layus ];
};
src = fetchFromGitHub {
owner = "multipath-tcp";
repo = "mptcp";
rev = "v${mptcpVersion}";
sha256 = "1irlppzvcmckrazs2c4vg6y8ji31552izc3wqabf401v57jvxcys";
};
extraConfig = ''
IPV6 y
MPTCP y
IP_MULTIPLE_TABLES y
# Enable advanced path-managers...
MPTCP_PM_ADVANCED y
MPTCP_FULLMESH y
MPTCP_NDIFFPORTS y
# ... but use none by default.
# The default is safer if source policy routing is not setup.
DEFAULT_DUMMY y
DEFAULT_MPTCP_PM default
# MPTCP scheduler selection.
# Disabled as the only non-default is the useless round-robin.
MPTCP_SCHED_ADVANCED n
DEFAULT_MPTCP_SCHED default
# Smarter TCP congestion controllers
TCP_CONG_LIA m
TCP_CONG_OLIA m
TCP_CONG_WVEGAS m
TCP_CONG_BALIA m
'' + (args.extraConfig or "");
} // args // (args.argsOverride or {}))