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.
This commit is contained in:
Doron Behar
2026-01-17 21:58:32 +02:00
parent b78fd11bc6
commit 4d577acbc2
+4 -1
View File
@@ -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
'';