Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

94 lines
2.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gperf,
libcap,
meson,
ninja,
nix-update-script,
openssl,
pkg-config,
pkgsCross,
sphinx,
systemd,
systemdLibs,
testers,
opensslSupport ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "systemd-netlogd";
version = "1.4.4";
outputs = [
"out"
"man"
];
src = fetchFromGitHub {
owner = "systemd";
repo = "systemd-netlogd";
tag = "v${finalAttrs.version}";
hash = "sha256-Kgr6KZp2SSLG8xnqXNWsDgIa9rNnBGcN+TkuAbr+yAA=";
};
# Fixup a few installation paths
postPatch = ''
substituteInPlace meson.build \
--replace-fail "get_option('prefix')" "get_option('bindir')"
substituteInPlace doc/meson.build \
--replace-fail "'/usr/share/man/man8'" "get_option('mandir') / 'man8'"
substituteInPlace units/meson.build \
--replace-fail "get_option('prefix') / 'system'" "get_option('libdir') / 'systemd/system'"
substituteInPlace units/systemd-netlogd.service.in \
--replace-fail '@PKGPREFIX@/systemd-netlogd' '${placeholder "out"}/bin/systemd-netlogd'
'';
strictDeps = true;
nativeBuildInputs = [
gperf
meson
ninja
pkg-config
sphinx
];
buildInputs = [
libcap
systemdLibs
]
++ lib.optional opensslSupport openssl;
mesonFlags = [
"--sysconfdir=${placeholder "out"}/etc/systemd"
(lib.mesonBool "openssl" opensslSupport)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru = {
# Make sure x86_64-linux -> aarch64-linux cross compilation works
tests = {
version = testers.testVersion { package = finalAttrs.finalPackage; };
}
// lib.optionalAttrs (stdenv.buildPlatform.system == "x86_64-linux") {
aarch64-cross = pkgsCross.aarch64-multiplatform.systemd-netlogd;
};
updateScript = nix-update-script { };
};
meta = {
description = "Forwards messages from the journal to other hosts over the network";
homepage = "https://github.com/systemd/systemd-netlogd";
changelog = "https://github.com/systemd/systemd-netlogd/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ getchoo ];
mainProgram = "systemd-netlogd";
inherit (systemd.meta) platforms;
};
})