From 30c355bde01a4e4439c17b853c74a952a45e2891 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 25 Jan 2025 16:03:30 +0100 Subject: [PATCH] chawan: fix search path patching --- pkgs/by-name/ch/chawan/package.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ch/chawan/package.nix b/pkgs/by-name/ch/chawan/package.nix index ce320d7d167e..cf5c642e87e1 100644 --- a/pkgs/by-name/ch/chawan/package.nix +++ b/pkgs/by-name/ch/chawan/package.nix @@ -26,12 +26,14 @@ stdenv.mkDerivation { fetchSubmodules = true; }; - patches = [ - # Include chawan's man pages in mancha's search path - (replaceVars ./mancha-augment-path.diff { - out = placeholder "out"; - }) - ]; + patches = [ ./mancha-augment-path.diff ]; + + # Include chawan's man pages in mancha's search path + postPatch = '' + # As we need the $out reference, we can't use `replaceVars` here. + substituteInPlace adapter/protocol/man.nim \ + --replace-fail '@out@' "$out" + ''; env.NIX_CFLAGS_COMPILE = toString ( lib.optional stdenv.cc.isClang "-Wno-error=implicit-function-declaration"