diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index de5a3b225876..1dbfd1528467 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -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 [