3 # Whether to build the TLS/SSL tools and what library to use
4 # acceptable values: "bearssl", "libressl", false
5 , sslSupport ? "bearssl" , libressl, bearssl
10 sslSupportEnabled = sslSupport != false;
17 assert sslSupportEnabled -> sslLibs ? ${sslSupport};
21 pname = "s6-networking";
23 sha256 = "sha256-esedTePZwTUy5ESrdJfE4ErQ+nIp1QKYTZ3H1IqmRBg=";
25 description = "A suite of small networking utilities for Unix systems";
27 outputs = [ "bin" "lib" "dev" "doc" "out" ];
31 "--libdir=\${lib}/lib"
32 "--libexecdir=\${lib}/libexec"
33 "--dynlibdir=\${lib}/lib"
34 "--bindir=\${bin}/bin"
35 "--includedir=\${dev}/include"
36 "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
37 "--with-include=${skalibs.dev}/include"
38 "--with-include=${execline.dev}/include"
39 "--with-include=${s6.dev}/include"
40 "--with-include=${s6-dns.dev}/include"
41 "--with-lib=${skalibs.lib}/lib"
42 "--with-lib=${execline.lib}/lib"
43 "--with-lib=${s6.out}/lib"
44 "--with-lib=${s6-dns.lib}/lib"
45 "--with-dynlib=${skalibs.lib}/lib"
46 "--with-dynlib=${execline.lib}/lib"
47 "--with-dynlib=${s6.out}/lib"
48 "--with-dynlib=${s6-dns.lib}/lib"
50 ++ (lib.optionals sslSupportEnabled [
51 "--enable-ssl=${sslSupport}"
52 "--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
53 "--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
54 "--with-dynlib=${lib.getLib sslLibs.${sslSupport}}/lib"
58 # remove all s6 executables from build directory
59 rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
60 rm libs6net.* libstls.* libs6tls.* libsbearssl.*
62 mv doc $doc/share/doc/s6-networking/html