nixpkgs/pkgs/development/skaware-packages/s6-networking/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

87 lines
2.2 KiB
Nix

{
lib,
skawarePackages,
skalibs,
execline,
s6,
s6-dns,
# Whether to build the TLS/SSL tools and what library to use
# acceptable values: "bearssl", "libressl", false
sslSupport ? "bearssl",
libressl,
bearssl,
}:
let
sslSupportEnabled = sslSupport != false;
sslLibs = {
libressl = libressl;
bearssl = bearssl;
};
in
assert sslSupportEnabled -> sslLibs ? ${sslSupport};
skawarePackages.buildPackage {
pname = "s6-networking";
version = "2.7.0.3";
sha256 = "20EcVDcaF+19RUPdhs+VMM4l/PYkvvg64rV5Ug5ecL8=";
manpages = skawarePackages.buildManPages {
pname = "s6-networking-man-pages";
version = "2.7.0.3.1";
sha256 = "9u2C1TF9vma+7Qo+00uZ6eOCn/9eMgKALgHDVgMcrfg=";
description = "Port of the documentation for the s6-networking suite to mdoc";
maintainers = [ lib.maintainers.sternenseemann ];
};
description = "Suite of small networking utilities for Unix systems";
outputs = [
"bin"
"lib"
"dev"
"doc"
"out"
];
# TODO: nsss support
configureFlags =
[
"--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"
]
++ (lib.optionals sslSupportEnabled [
"--enable-ssl=${sslSupport}"
"--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
"--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
"--with-dynlib=${lib.getLib sslLibs.${sslSupport}}/lib"
]);
postInstall = ''
# remove all s6 executables from build directory
rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
rm libs6net.* libstls.* libs6tls.* libsbearssl.*
mv doc $doc/share/doc/s6-networking/html
'';
}