tayga: 0.9.5 -> 0.9.6

Diff: https://github.com/apalrd/tayga/compare/0.9.5...0.9.6
This commit is contained in:
Nick Cao
2026-01-27 22:56:28 -05:00
parent 1b1a7129f2
commit 35b41917ac
+30 -15
View File
@@ -2,40 +2,55 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
version = "0.9.5";
pname = "tayga";
version = "0.9.6";
src = fetchFromGitHub {
owner = "apalrd";
repo = "tayga";
tag = finalAttrs.version;
hash = "sha256-xOm4fetFq2UGuhOojrT8WOcX78c6MLTMVbDv+O62x2E=";
hash = "sha256-OsF2RqZzDvf8FMLHN6YAKvWfFgAIQfVkbBTC8hjf2dU=";
};
makeFlags = [ "CC=${lib.getExe stdenv.cc}" ];
patches = [
# nat64.c: call inet_ntop with properly sized buffers
# https://github.com/apalrd/tayga/pull/168
(fetchpatch2 {
url = "https://github.com/apalrd/tayga/commit/b41bd030846451d72b277854678b58370b1d5c8f.patch?full_index=1";
hash = "sha256-vFQTlZs9ghxdx4k/iODDOUBAglyll1OxUdTjzDtcwB0=";
})
];
makeFlags = [
"prefix=${placeholder "out"}"
];
installFlags = [
"WITH_SYSTEMD=1"
"sbindir=${placeholder "out"}/bin"
"sysconfdir=${placeholder "out"}/etc"
"servicedir=${placeholder "out"}/lib/systemd/system"
];
postInstall = ''
substituteInPlace "$out/lib/systemd/system/tayga@.service" \
--replace-fail "ExecSearchPath=/usr/local/sbin:/usr/sbin" "" \
--replace-fail "ExecStart=tayga" "ExecStart=$out/bin/tayga"
'';
env = lib.optionalAttrs stdenv.hostPlatform.is32bit {
NIX_CFLAGS_COMPILE = "-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64";
};
preBuild = ''
echo "#define TAYGA_VERSION \"${finalAttrs.version}\"" > version.h
'';
installPhase = ''
install -Dm755 tayga $out/bin/tayga
install -D tayga.conf.5 $out/share/man/man5/tayga.conf.5
install -D tayga.8 $out/share/man/man8/tayga.8
cp -R docs $out/share/
cp tayga.conf.example $out/share/docs/
'';
passthru.tests.tayga = nixosTests.tayga;
doCheck = true;
meta = {
description = "Userland stateless NAT64 daemon";
longDescription = ''