nixpkgs/pkgs/tools/networking/ip2unix/default.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, libyamlcpp, systemd
, python3Packages, asciidoc, libxslt, docbook_xml_dtd_45, docbook_xsl
, libxml2, docbook5
}:
stdenv.mkDerivation rec {
name = "ip2unix-${version}";
ip2unix: 1.2.0 -> 2.0.0 New upstream features: - New ignore rule option, which prevents conversion to Unix socket. - A way to increase the verbosity via the -v command line argument. - Reams of log messages in addition to the FATAL errors we had so far. - Use Syslog format for logging if stderr is a socket. - Set FD_CLOEXEC on systemd socket file descriptors as soon as they're associated. Upstream fixes: - Use right endian conversion functions in port matching. - Pass is_unix to child socket on accept to prevent accidentally replacing an already converted Unix socket by a new Unix socket. The latter would be a socket that's not accepted, which would eventually lead to an error. - Correctly handle setsockopts used with other levels than SOL_SOCKET. Upstream changes: - Improve wording and add more descriptions in README and manpage. - The implementation for fetching systemd sockets now no longer uses libsystemd, thus the build-time dependency is no longer required. - New serialiser for passing rules to the preloaded library in a more compact form instead of using YAML, so it's less likely that we'll hit the maximum stack size. - Systemd sockets are now associated during rule initialisation and thus behave more predictable in complex setups. On our side, the dependency on systemd is only needed for running the tests, as it uses the systemd-socket-activate helper. Socket association is now done by ip2unix directly and doesn't rely on libsystemd anymore. Built and tested on i686-linux and x86_64-linux. Signed-off-by: aszlig <aszlig@nix.build>
2018-12-26 19:36:49 +01:00
version = "2.0.0";
src = fetchFromGitHub {
owner = "nixcloud";
repo = "ip2unix";
rev = "v${version}";
ip2unix: 1.2.0 -> 2.0.0 New upstream features: - New ignore rule option, which prevents conversion to Unix socket. - A way to increase the verbosity via the -v command line argument. - Reams of log messages in addition to the FATAL errors we had so far. - Use Syslog format for logging if stderr is a socket. - Set FD_CLOEXEC on systemd socket file descriptors as soon as they're associated. Upstream fixes: - Use right endian conversion functions in port matching. - Pass is_unix to child socket on accept to prevent accidentally replacing an already converted Unix socket by a new Unix socket. The latter would be a socket that's not accepted, which would eventually lead to an error. - Correctly handle setsockopts used with other levels than SOL_SOCKET. Upstream changes: - Improve wording and add more descriptions in README and manpage. - The implementation for fetching systemd sockets now no longer uses libsystemd, thus the build-time dependency is no longer required. - New serialiser for passing rules to the preloaded library in a more compact form instead of using YAML, so it's less likely that we'll hit the maximum stack size. - Systemd sockets are now associated during rule initialisation and thus behave more predictable in complex setups. On our side, the dependency on systemd is only needed for running the tests, as it uses the systemd-socket-activate helper. Socket association is now done by ip2unix directly and doesn't rely on libsystemd anymore. Built and tested on i686-linux and x86_64-linux. Signed-off-by: aszlig <aszlig@nix.build>
2018-12-26 19:36:49 +01:00
sha256 = "0xxwx1ip5jhkq93b91gcqd1i4njlvl9c4vjzijbdhjrrzz971iwk";
};
nativeBuildInputs = [
meson ninja pkgconfig asciidoc libxslt.bin docbook_xml_dtd_45 docbook_xsl
libxml2.bin docbook5 python3Packages.pytest python3Packages.pytest-timeout
ip2unix: 1.2.0 -> 2.0.0 New upstream features: - New ignore rule option, which prevents conversion to Unix socket. - A way to increase the verbosity via the -v command line argument. - Reams of log messages in addition to the FATAL errors we had so far. - Use Syslog format for logging if stderr is a socket. - Set FD_CLOEXEC on systemd socket file descriptors as soon as they're associated. Upstream fixes: - Use right endian conversion functions in port matching. - Pass is_unix to child socket on accept to prevent accidentally replacing an already converted Unix socket by a new Unix socket. The latter would be a socket that's not accepted, which would eventually lead to an error. - Correctly handle setsockopts used with other levels than SOL_SOCKET. Upstream changes: - Improve wording and add more descriptions in README and manpage. - The implementation for fetching systemd sockets now no longer uses libsystemd, thus the build-time dependency is no longer required. - New serialiser for passing rules to the preloaded library in a more compact form instead of using YAML, so it's less likely that we'll hit the maximum stack size. - Systemd sockets are now associated during rule initialisation and thus behave more predictable in complex setups. On our side, the dependency on systemd is only needed for running the tests, as it uses the systemd-socket-activate helper. Socket association is now done by ip2unix directly and doesn't rely on libsystemd anymore. Built and tested on i686-linux and x86_64-linux. Signed-off-by: aszlig <aszlig@nix.build>
2018-12-26 19:36:49 +01:00
systemd
];
ip2unix: 1.2.0 -> 2.0.0 New upstream features: - New ignore rule option, which prevents conversion to Unix socket. - A way to increase the verbosity via the -v command line argument. - Reams of log messages in addition to the FATAL errors we had so far. - Use Syslog format for logging if stderr is a socket. - Set FD_CLOEXEC on systemd socket file descriptors as soon as they're associated. Upstream fixes: - Use right endian conversion functions in port matching. - Pass is_unix to child socket on accept to prevent accidentally replacing an already converted Unix socket by a new Unix socket. The latter would be a socket that's not accepted, which would eventually lead to an error. - Correctly handle setsockopts used with other levels than SOL_SOCKET. Upstream changes: - Improve wording and add more descriptions in README and manpage. - The implementation for fetching systemd sockets now no longer uses libsystemd, thus the build-time dependency is no longer required. - New serialiser for passing rules to the preloaded library in a more compact form instead of using YAML, so it's less likely that we'll hit the maximum stack size. - Systemd sockets are now associated during rule initialisation and thus behave more predictable in complex setups. On our side, the dependency on systemd is only needed for running the tests, as it uses the systemd-socket-activate helper. Socket association is now done by ip2unix directly and doesn't rely on libsystemd anymore. Built and tested on i686-linux and x86_64-linux. Signed-off-by: aszlig <aszlig@nix.build>
2018-12-26 19:36:49 +01:00
buildInputs = [ libyamlcpp ];
doCheck = true;
doInstallCheck = true;
installCheckPhase = ''
found=0
for man in "$out/share/man/man1"/ip2unix.1*; do
test -s "$man" && found=1
done
if [ $found -ne 1 ]; then
echo "ERROR: Manual page hasn't been generated." >&2
exit 1
fi
'';
meta = {
homepage = https://github.com/nixcloud/ip2unix;
description = "Turn IP sockets into Unix domain sockets";
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.lgpl3;
maintainers = [ stdenv.lib.maintainers.aszlig ];
};
}