From 4d577acbc242a86397dda59502b44ab630eb1d41 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 15 Jan 2026 15:27:29 +0200 Subject: [PATCH] samba: use substitutionInPlace instead of sed in fixup substituteInPlace is more reliable as sed won't print any warning or error when it does nothing. --- pkgs/servers/samba/4.x.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index 2b0a7f76eab3..6d68a2b8b44e 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -311,7 +311,10 @@ stdenv.mkDerivation (finalAttrs: { # Samba does its own shebang patching, but uses build Python find $out/bin -type f -executable | while read file; do isScript "$file" || continue - sed -i 's^${lib.getBin buildPackages.python3Packages.python}^${lib.getBin python3Packages.python}^' "$file" + substituteInPlace "$file" \ + --replace-fail \ + ${lib.getBin buildPackages.python3Packages.python} \ + ${lib.getBin python3Packages.python} done '';