File tree Expand file tree Collapse file tree 3 files changed +116
-0
lines changed
Expand file tree Collapse file tree 3 files changed +116
-0
lines changed Original file line number Diff line number Diff line change 11331133 ./services/networking/lxd-image-server.nix
11341134 ./services/networking/magic-wormhole-mailbox-server.nix
11351135 ./services/networking/matterbridge.nix
1136+ ./services/networking/mptcpd.nix
11361137 ./services/networking/microsocks.nix
11371138 ./services/networking/mihomo.nix
11381139 ./services/networking/minidlna.nix
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ lib ,
4+ pkgs ,
5+ ...
6+ } :
7+ let
8+
9+ cfg = config . services . mptcpd ;
10+
11+ in
12+
13+ {
14+
15+ options = {
16+
17+ services . mptcpd = {
18+
19+ enable = lib . mkEnableOption "the Multipath TCP path management daemon" ;
20+
21+ package = lib . mkPackageOption pkgs "mptcpd" { } ;
22+
23+ } ;
24+
25+ } ;
26+
27+ config = lib . mkIf cfg . enable {
28+
29+ environment . systemPackages = [ cfg . package ] ;
30+
31+ systemd . packages = [ cfg . package ] ;
32+
33+ } ;
34+
35+ meta . maintainers = with lib . maintainers ; [ nim65s ] ;
36+ }
Original file line number Diff line number Diff line change 1+ {
2+ autoreconfHook ,
3+ autoconf-archive ,
4+ doxygen ,
5+ ell ,
6+ fetchFromGitHub ,
7+ fontconfig ,
8+ graphviz ,
9+ lib ,
10+ pandoc ,
11+ perl ,
12+ pkg-config ,
13+ stdenv ,
14+ systemd ,
15+ } :
16+
17+ stdenv . mkDerivation ( finalAttrs : {
18+ pname = "mptcpd" ;
19+ version = "0.13" ;
20+
21+ src = fetchFromGitHub {
22+ owner = "multipath-tcp" ;
23+ repo = "mptcpd" ;
24+ rev = "v${ finalAttrs . version } " ;
25+ hash = "sha256-gPXtYmCLJ8eL6VfCi3kpDA7lNn38WB6J4FXefdu2D7M=" ;
26+ } ;
27+
28+ outputs = [
29+ "out"
30+ "doc"
31+ ] ;
32+
33+ nativeBuildInputs = [
34+ autoreconfHook
35+ autoconf-archive
36+ doxygen
37+ graphviz
38+ pandoc
39+ perl
40+ pkg-config
41+ ] ;
42+
43+ # ref. https://github.com/multipath-tcp/mptcpd/blob/main/README.md#bootstrapping
44+ preConfigure = "./bootstrap" ;
45+
46+ # fix: 'To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"'
47+ postConfigure = "doxygen -u" ;
48+
49+ configureFlags = [
50+ "--with-systemdsystemunitdir=${ placeholder "out" } /lib/systemd/system"
51+ ] ;
52+
53+ # fix: 'Fontconfig error: Cannot load default config file: No such file: (null)'
54+ env . FONTCONFIG_FILE = "${ fontconfig . out } /etc/fonts/fonts.conf" ;
55+
56+ buildInputs = [
57+ ell
58+ systemd
59+ ] ;
60+
61+ # fix: 'Fontconfig error: No writable cache directories'
62+ preBuild = "export XDG_CACHE_HOME=$(mktemp -d)" ;
63+
64+ # build and install doc
65+ postBuild = "make doxygen-doc" ;
66+ postInstall = "mv doc $doc" ;
67+
68+ doCheck = true ;
69+
70+ meta = {
71+ description = "Daemon for Linux that performs Multipath TCP path management related operations in the user space" ;
72+ homepage = "https://github.com/multipath-tcp/mptcpd" ;
73+ changelog = "https://github.com/multipath-tcp/mptcpd/blob/${ finalAttrs . src . rev } /NEWS" ;
74+ license = lib . licenses . bsd3 ;
75+ maintainers = with lib . maintainers ; [ nim65s ] ;
76+ mainProgram = "mptcpize" ;
77+ platforms = lib . platforms . linux ;
78+ } ;
79+ } )
You can’t perform that action at this time.
0 commit comments