samba: avoid shebang patching by using correct pythonWrap

As explained in #480392, the shebangs need fixing not because of samba's
build system, but because our `wrapPythonPrograms` is buggy.
This commit is contained in:
Doron Behar
2026-01-25 15:02:13 +02:00
parent 9291bd92f6
commit 19cbbeae0f
+5 -10
View File
@@ -35,6 +35,7 @@
rpcsvc-proto,
bash,
python3Packages,
pkgsHostTarget,
nixosTests,
libiconv,
testers,
@@ -113,7 +114,10 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
python3Packages.python
python3Packages.wrapPython
# Not `python3Packages.wrapPython` to workaround
# `python3Packages.wrapPython.__spliced.buildHost` having the wrong
# `pythonHost`. See https://github.com/NixOS/nixpkgs/issues/434307
pkgsHostTarget.python3Packages.wrapPython
wafHook
pkg-config
bison
@@ -310,15 +314,6 @@ stdenv.mkDerivation (finalAttrs: {
# Fix PYTHONPATH for some tools
wrapPythonPrograms
# Samba does its own shebang patching, but uses build Python
find $out/bin -type f -executable | while read file; do
isScript "$file" || continue
substituteInPlace "$file" \
--replace-fail \
${lib.getBin buildPackages.python3Packages.python} \
${lib.getBin python3Packages.python}
done
'';
disallowedReferences = lib.optionals isCross [