From 08b5c11cb56e63ca6eb8908044e4f84c5618d280 Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Fri, 2 May 2025 10:48:57 +0800 Subject: [PATCH] tm: unbreak --- .../by-name/tm/tm/missing-string-header.patch | 24 +++++++++++++++++++ pkgs/by-name/tm/tm/package.nix | 5 ++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/by-name/tm/tm/missing-string-header.patch diff --git a/pkgs/by-name/tm/tm/missing-string-header.patch b/pkgs/by-name/tm/tm/missing-string-header.patch new file mode 100644 index 000000000000..134102400a6d --- /dev/null +++ b/pkgs/by-name/tm/tm/missing-string-header.patch @@ -0,0 +1,24 @@ +diff --git a/unix_client.c b/unix_client.c +index 920910a..6d608fd 100644 +--- a/unix_client.c ++++ b/unix_client.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "main.h" + #include "handlers.h" +diff --git a/unix_server.c b/unix_server.c +index 5cf93ed..d3c51c9 100644 +--- a/unix_server.c ++++ b/unix_server.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/pkgs/by-name/tm/tm/package.nix b/pkgs/by-name/tm/tm/package.nix index 45208fa35399..48c40568fdbc 100644 --- a/pkgs/by-name/tm/tm/package.nix +++ b/pkgs/by-name/tm/tm/package.nix @@ -15,6 +15,11 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; + patches = [ + # fix using strncpy and strlen without including string.h + ./missing-string-header.patch + ]; + postPatch = '' sed -i 's@/usr/bin/install@install@g ; s/gcc/cc/g' Makefile '';