2021-03-26 05:13:53 +00:00
|
|
|
{ lib, skawarePackages
|
2018-07-27 07:10:10 +00:00
|
|
|
|
|
|
|
# Whether to build the TLS/SSL tools and what library to use
|
2021-03-21 18:56:02 +00:00
|
|
|
# acceptable values: "bearssl", "libressl", false
|
|
|
|
, sslSupport ? "bearssl" , libressl, bearssl
|
2018-07-27 07:10:10 +00:00
|
|
|
}:
|
2014-08-30 05:07:45 +00:00
|
|
|
|
2018-09-02 21:31:26 +00:00
|
|
|
with skawarePackages;
|
2014-08-30 05:07:45 +00:00
|
|
|
let
|
2018-07-27 07:10:10 +00:00
|
|
|
sslSupportEnabled = sslSupport != false;
|
|
|
|
sslLibs = {
|
2019-08-13 21:52:01 +00:00
|
|
|
libressl = libressl;
|
2021-03-21 18:56:02 +00:00
|
|
|
bearssl = bearssl;
|
2018-07-27 07:10:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
assert sslSupportEnabled -> sslLibs ? ${sslSupport};
|
|
|
|
|
2014-08-30 05:07:45 +00:00
|
|
|
|
2018-09-02 21:31:26 +00:00
|
|
|
buildPackage {
|
|
|
|
pname = "s6-networking";
|
2021-06-15 13:48:35 +00:00
|
|
|
version = "2.4.1.1";
|
|
|
|
sha256 = "0m55ibx7k2wgrqbpci1n667ij0h925ajzggxalq2pj65kmwcmyx3";
|
2014-08-30 05:07:45 +00:00
|
|
|
|
2018-09-02 21:31:26 +00:00
|
|
|
description = "A suite of small networking utilities for Unix systems";
|
2014-08-30 05:07:45 +00:00
|
|
|
|
2018-07-22 15:03:19 +00:00
|
|
|
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
|
|
|
|
2018-09-02 15:04:57 +00:00
|
|
|
# TODO: nsss support
|
2014-12-23 16:06:27 +00:00
|
|
|
configureFlags = [
|
2018-07-22 15:03:19 +00:00
|
|
|
"--libdir=\${lib}/lib"
|
|
|
|
"--libexecdir=\${lib}/libexec"
|
|
|
|
"--dynlibdir=\${lib}/lib"
|
|
|
|
"--bindir=\${bin}/bin"
|
|
|
|
"--includedir=\${dev}/include"
|
|
|
|
"--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
|
|
|
|
"--with-include=${skalibs.dev}/include"
|
|
|
|
"--with-include=${execline.dev}/include"
|
|
|
|
"--with-include=${s6.dev}/include"
|
|
|
|
"--with-include=${s6-dns.dev}/include"
|
|
|
|
"--with-lib=${skalibs.lib}/lib"
|
|
|
|
"--with-lib=${execline.lib}/lib"
|
|
|
|
"--with-lib=${s6.out}/lib"
|
|
|
|
"--with-lib=${s6-dns.lib}/lib"
|
|
|
|
"--with-dynlib=${skalibs.lib}/lib"
|
|
|
|
"--with-dynlib=${execline.lib}/lib"
|
|
|
|
"--with-dynlib=${s6.out}/lib"
|
|
|
|
"--with-dynlib=${s6-dns.lib}/lib"
|
2016-04-01 15:20:13 +00:00
|
|
|
]
|
2018-07-27 07:10:10 +00:00
|
|
|
++ (lib.optionals sslSupportEnabled [
|
|
|
|
"--enable-ssl=${sslSupport}"
|
|
|
|
"--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
|
|
|
|
"--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
|
2018-09-02 21:31:26 +00:00
|
|
|
"--with-dynlib=${lib.getLib sslLibs.${sslSupport}}/lib"
|
|
|
|
]);
|
2014-08-30 05:07:45 +00:00
|
|
|
|
2018-07-22 15:03:19 +00:00
|
|
|
postInstall = ''
|
2018-09-02 21:31:26 +00:00
|
|
|
# remove all s6 executables from build directory
|
|
|
|
rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
|
|
|
|
rm minidentd
|
2021-03-21 18:56:02 +00:00
|
|
|
rm libs6net.* libstls.* libs6tls.* libsbearssl.*
|
2018-09-02 21:31:26 +00:00
|
|
|
|
2018-07-22 15:03:19 +00:00
|
|
|
mv doc $doc/share/doc/s6-networking/html
|
|
|
|
'';
|
|
|
|
|
2014-08-30 05:07:45 +00:00
|
|
|
}
|